iterating in reverse

Nick Vargish nav at
Mon Jan 20 02:01:14 CET 2003

bokr at (Bengt Richter) writes:

>  >>> def commafy(val): return val<1000 and str(val) or \
>                               commafy(val/1000)+','+commafy(val%1000)
>  ...

If the re solution means Perl envy, is this Lisp envy? :^) I like this
the best so far, I think it's what I'll borrow, if Bengt doesn't

"I am but an egg,"


#  ||  version 0.2  ||  2003-01-07  ||  Feed this to your Python.
print reduce(lambda x,y:x+chr(ord(y)-1),'Ojdl!Wbshjti!=obwAqbusjpu/ofu?','')

More information about the Python-list mailing list