James Stroud wrote:

> Of course, I think str.join can operate on iterators, as Paul Rubin 
> suggests:
> 
>  > print ''.join(reversed(x))
> 
> This latter approach still seems a little clunky, though.
> 
> James

Slices can be named so you could do...

 >>> reverser = slice(None, None, -1)
 >>>
 >>> 'abcdefg'[reverser]
'gfedcba'


Ron
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to