r/PythonLearning • • Aug 17 '25

What's wrong

Post image
49 Upvotes

45 comments sorted by

View all comments

1

u/purple_hamster66 Aug 17 '25

There is also this way, which I prefer because I like to list the verb before the objects:

print(i) for i in l

This mimics the way we talk. If you were describing it, you’d say “print each element in l”, not “for each element in l, print the element”, which requires a redundant “back-reference” that we should minimize because it is not needed to understand the purpose of the code.

Meaning is King; don’t be a Prince when you can be a King.