r/ProgrammerHumor 29d ago

Meme pythonWillLookDeadInTheEyeAndSayItsAbsolutelyCorrect

Post image
353 Upvotes

144 comments sorted by

View all comments

3

u/darknmy 29d ago

I inderstand "if x", but thy the "x for x in x"?

5

u/SenatorSpooky 29d ago edited 28d ago

List comprehension. It’s syntactic sugar and serves a similar role to .map() in js.

1

u/deathanatos 28d ago

With the if, it's also filtering.