Countdown

Rob Hooft rob at hooft.net
Fri Jun 23 04:53:44 EDT 2000


 RK> So stick it in a function.

 RK> def revrange(*args, **kw):
 RK>    l = apply(range, args, kw)
 RK>    l.reverse()
 RK>    return l

But then why not:

def revxrange(n):
    return xrange(n-1,-1,-1)

....Or more complicated if you need more complicated cases.

Rob

-- 
=====   rob at hooft.net          http://www.hooft.net/people/rob/  =====
=====   R&D, Nonius BV, Delft  http://www.nonius.nl/             =====
===== PGPid 0xFA19277D ========================== Use Linux! =========



More information about the Python-list mailing list