Does anyone else use this little idiom?

Paul Rubin http
Sun Feb 3 19:20:15 EST 2008


miller.paul.w at gmail.com 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