iterating in reverse
Nick Vargish
nav at adams.patriot.net
Sun Jan 19 20:01:14 EST 2003
bokr at oz.net (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
mind.
"I am but an egg,"
Nick
--
# sigmask.py || 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