Check if something is (not) in a list in Python
The bug is probably somewhere else in your code, because it should work fine: Or with tuples:
The bug is probably somewhere else in your code, because it should work fine: Or with tuples:
if is the statement. not start is the expression, with not being a boolean operator. not returns True if the operand (start here) is considered false. Python considers all objects to be true, unless they are numeric zero, or an empty container, or the None object or the boolean False value. not returns False if start is a true value. See the Truth Value Testing section in the documentation. So if start is None, then indeed not start will be true. start can also be 0, or … Read more