Does anyone else use this little idiom?

Paul Rubin http
Mon Feb 4 01:20:15 CET 2008

miller.paul.w at writes:
> where n is an integer representing how many times you want
> to execute "some code." ... I tend to write it as:
> for _ in xrange (1,n):
>    some code

But this does it n-1 times, not n times.

More information about the Python-list mailing list