list - Python: reverse a string -


possible duplicate:
reverse string in python

i understand data in python (strings) stored lists

example:

string1 = "foo" "foo"[1] = "o" 

how use list.reverse function reverse characters in string? such input "foo" , returned "oof"

you wouldn't.

>>> "foo"[::-1] 'oof' 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -