[Tutor] Anyone fancy giving me some tips and an expert opinion??

Kent Johnson kent37 at tds.net
Tue Mar 18 22:03:57 CET 2008


elis aeris wrote:

> for x in xrange (20, 0):
>     print x

> but what if I need the for loop to go from a big number to a small number?

Just give a step value:
for x in xrange(20, 0, -1):
   print x

Kent


More information about the Tutor mailing list