iterating in reverse

Nick Vargish nav at adams.patriot.net
Sun Jan 19 00:43:20 EST 2003


"Neil Hodgson" <nhodgson at bigpond.net.au> writes:

>  return ''.join([u[i]+(['',',',''][(len(u)-i)%3]) for i in
> range(len(u))])[:-1]
  ...
>    Mmm, Perl envy ...

Now I feel like I've created a monster.

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