it doesn’t give an output and I Know that the output should be True or False
some = [1, 9, 21, 3]
9 in some
CodePudding user response:
As others have pointed out, you need to do something with the result. You can save it into a variable with:
var = 9 in some
or print it directly with:
print(9 in some)
CodePudding user response:
It does return a TRUE/FALSE:
[In]: 3 in list([1,2,35])
[Out]: False
[In]: 3 in list([1,2,3,5])
[Out]: True