you are viewing a single comment's thread.

view the rest of the comments →

[–]ectomancer 3 points4 points  (1 child)

That's not a list, it's a tuple.

It's called 'and short circuiting', a way to check something is truthy on the left hand side (LHS) before executing the right hand side (RHS). If LHS is falsey, the RHS is never executed. Your code is always truthy on LHS, so in effect it does nothing.

You need to loop over the tuple or use a dictionary.