On Sep 20, 11:16�am, Alex Snast <[EMAIL PROTECTED]> wrote: > Hello > > I'm new to python and i can't figure out how to write a reverse for > loop in python > > e.g. the python equivalent to the c++ loop > > for (i = 10; i >= 0; --i)
>>> for i in xrange(10,-1,-1): print i, 10 9 8 7 6 5 4 3 2 1 0 Note the starting number is 10, the ending number is -1 because you want to include 0 and the step size is -1. -- http://mail.python.org/mailman/listinfo/python-list