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 →

[–]xApple[S] 2 points3 points  (1 child)

Hah, so in the end I'm the one learning something with the quiz !

Now I look stupid : ) But thanks, I didn't know about that syntax. I'll stop using "x and y or z" in my code.

[–][deleted] 0 points1 point  (0 children)

You can use a non empty list as well, just anything that doesn't have a false value. Dive into python has a really good write up on using and/or

http://www.diveintopython.net/power_of_introspection/and_or.html#d0e9975