+ 2

How to reverse a string in python?

How can i do it using compressions...

6th Apr 2019, 5:17 AM
Mensch
Mensch - avatar
10 Answers
6th Apr 2019, 6:00 AM
Lambda_Driver
Lambda_Driver - avatar
+ 6
https://code.sololearn.com/cCGVrnaCnv1X/?ref=app
6th Apr 2019, 5:41 AM
Sarthak Pokhrel
Sarthak Pokhrel - avatar
+ 5
What do you mean using compressions?
6th Apr 2019, 6:06 AM
Anna
Anna - avatar
6th Apr 2019, 8:06 AM
sumito_hz
sumito_hz - avatar
+ 3
print ("Hello World"[::-1])
6th Apr 2019, 8:11 AM
Er. Mohd. Shadab
Er. Mohd. Shadab - avatar
+ 2
Lambda_Driver thanks,that's what i was looking for.
6th Apr 2019, 6:25 AM
Mensch
Mensch - avatar
+ 2
Astralis You were looking for list slicing, not "compressions".
6th Apr 2019, 6:50 AM
Diego
Diego - avatar
+ 2
Hey it's so easy u can use slicing
4th Sep 2019, 4:33 PM
Amit singh
Amit singh - avatar
+ 2
Amit singh S=X[::-1]
4th Sep 2019, 5:52 PM
Er. Mohd. Shadab
Er. Mohd. Shadab - avatar
0
x="amit" S=x[::-1]
4th Sep 2019, 4:34 PM
Amit singh
Amit singh - avatar