Hello,

>>> y=list(x).reverse()
> >>> print y
> None
>

>>> L = ["a", "b", "c"]
>>> L.reverse()
>>> L
["c", "b", "a"]

As you can see, L.reverse() performs the operation on itself and returns
nothing. Hence, the return type None.

Instead of

y=''.join(list(x).reverse())

you should probably do,

>>> t = list(x).reverse()
>>> y = ''.join(t)

Cheers!
Zubin
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to