Syntactic sugar

Michael F. Stemper michael.stemper at gmail.com
Mon Jun 28 12:24:15 EDT 2021


I often want to execute a chunk of code n times

for iter in range(n):
   chunkofcode

Sometimes, the chunk of code doesn't care about which iteration
it's on. A week or two back, I would have sworn that I came across
a syntax for the above that eliminates the iteration counter.

This morning, I had use for that syntax, but couldn't find it
on-line or guess what it was. Does this syntax exist, or am I
simply imagining things?

Thanks,
-- 
Michael F. Stemper
There's no "me" in "team". There's no "us" in "team", either.


More information about the Python-list mailing list