What I mean by that is, that I want to take a list, let’s say"
["i","am","you","pure","fact"],
then check whether this list contains 2 different strings, like "i" and "pure", and then if true, it runs something.
This is what I am looking for, but in PYTHON.
I don’t know how to do this sort of check.
>Solution :
Try this out
elements = ["i","am","you","pure","fact"]
str1 = "i"
str2 = "pure"
if str1 in elements and str2 in elements:
# Execute code
...