iterating in reverse

Nick Vargish nav at adams.patriot.net
Fri Jan 17 21:52:27 CET 2003


Paul Rubin <phr-n2003b at NOSPAMnightsong.com> writes:

> If you're just looking for a practical solution, use the locale package,
> which does this formatting for you.

I couldn't make this work:

  >>> locale.format("%d", 1234567, 1)
  '1234567'

But thanks for the suggestion.

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