Accelerating For Loop

Peter Otten __peter__ at web.de
Wed Feb 23 10:54:04 CET 2011


Şansal Birbaş wrote:

>     for i in range(1,5):
>         for j in i*range(max_expander+1):
>             for k in i*range(max_expander+1):
>                 for m in i*range(max_expander+1):
>                     for r in i*range(max_expander+1):

I must be missing something, but I can't see why you are using 
i*range(...) instead of just range(...). Can you enlighten me?




More information about the Python-list mailing list