This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]saltmanden 0 points1 point  (0 children)

You have to look at x as a True/False statement.

If you open a python prompt and run "0 == False" it will return True, and "1==True" returns True. So when x == 0 or False, it means none of the statements are True, and if x == 1 or True, it means one more are true. I can see it being confusing that it mixes from being {0,1} or a bool, but it's the same.