In C and C++ and Java, the 'for' statement is a shortcut to make very
concise loops.  In python, 'for' iterates over elements in a sequence.
Is there a way to do this in python that's more concise than 'while'?

C:
for(i=0; i<length; i++)


python:
while i < length:
                        i += 1

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

Reply via email to