superpollo wrote:
<snip>

how to reverse a string in python? must i usa a temp? like:

>>> s = "ciccio"
>>> l = list(s)
>>> l.reverse()
>>> s = "".join(l)
>>> s
'oiccic'
>>>

???

bye


</div>

simply     s = s[::-1]

DaveA

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

Reply via email to