I have a stupid question. Suppose I have a list with different values. Like this:
[1,2,3,'b', None, False, True, 7.0]
And I want to iterate over it and check that each element is not in the list of some forbidden values. For example, this list [0,0.0].
And when I check False in [0,0.0], I get True. I understand that python distinguishes Falseup to 0here. But how can I avoid this and make this check correct - that the value is Falsenot in the list [0,0.0]?
source
share