Composition of functions
Zubin Mithra
zubin.mithra at gmail.com
Thu Jul 1 00:22:27 EDT 2010
> Er, I don't think you thought that one entirely through (/ tried it out):
>
>
My Apologies.
Here is a working one.
>>> x="123"
>>> t = list(x)
>>> t.reverse()
>>> print ''.join(t)
321
But of course, the method which was suggested earlier is far more elegant.
>>> print ''.join(reversed(list(x)))
Cheers!
Zubin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100701/5ef06291/attachment-0001.html>
More information about the Python-list
mailing list