houbahop wrote:
for i=morethanzero to n

for i in range(morethanzero, n): ...

for i= 5 to len(var)

for i in range(5, len(var)): ...

although range(len(var)) is usually not what you want, because you can just do:

for item in itertools.islice(var, 5, None):
    ...

or if you really do need the index too:

for i, item in itertools.islice(enumerate(var), 5, None):
    ...

Steve
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to