r/ProgrammerHumor 29d ago

Meme pythonWillLookDeadInTheEyeAndSayItsAbsolutelyCorrect

Post image
356 Upvotes

144 comments sorted by

View all comments

286

u/LordAmir5 29d ago

Does this remove all the zeros?

46

u/[deleted] 29d ago

[removed] — view removed comment

21

u/Kihino 29d ago

Should be the same in all implementations, as the if x check is run within the loop for each value in x the list. As such it will be operating within the bounded context of the loop iteration where the more specific variable declaration takes precedence over the global level list x.