+ 4
How to reverse a word to the Python?
https://code.sololearn.com/c88SZWzbZqi3/?ref=app, i can't reverse the word, help
4 Answers
+ 10
You don't have to do all that ,simply do =>
word[::-1] #it reverses list items ,and since string is an array of char it applies to it as well ,
+ 13
Not to forget that there is a reversed() function:
string_ = "Hello world"
print(''.join(reversed(string_)))
+ 3
Using three methods,
https://code.sololearn.com/c4JOQ5IZhUx5/?ref=app
+ 1
string="Austine"
reversed(string)