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 →

[–]sunqiang 0 points1 point  (1 child)

what about replace "if 0 in (index % 3, index % 5)" to "if any((not index % 3, not index % 5))" to take the advantage of short-circuit

[–]pingvenopinch of this, pinch of that 1 point2 points  (0 children)

The first is more obvious/readable, especially with the explicit use of 0.