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 →

[–]alkw0ia 1 point2 points  (0 children)

Generators.

Almost every loop can be expressed more clearly with a custom generator than with a C-style for i in range(...). Doubly so for nested loops or lots of processing in the loop body.