invert the order of a string

rtilley rtilley at vt.edu
Mon Feb 13 13:51:11 EST 2006


s = list('some_random_string')
print s
s.reverse()
print s
s = ''.join(s)
print s

Surely there's a better way to do this, right?



More information about the Python-list mailing list