python if something is true code example
Example 1: python if not true
a = False
if not a:
#Does this
a = True
if not a:
#Doesn't do this
Example 2: check all true python
>>> items = [[1, 2, 0], [1, 2, 0], [1, 2, 0]]
>>> all(flag == 0 for (_, _, flag) in items)
True
>>> items = [[1, 2, 0], [1, 2, 1], [1, 2, 0]]
>>> all(flag == 0 for (_, _, flag) in items)
False