+ 1

Why there is no build in method for reverse String??

15th Jan 2017, 4:03 AM
Mayur Chaudhari
Mayur Chaudhari - avatar
12 Answers
+ 12
s[::-1] # Look my code "Spam"
15th Jan 2017, 4:42 AM
Sergey
+ 10
in question you talk about string, no list
16th Jan 2017, 3:15 PM
Sergey
+ 10
and?
16th Jan 2017, 3:18 PM
Sergey
+ 10
#function def revers(s): return s[::-1]
16th Jan 2017, 3:20 PM
Sergey
+ 10
If you can, like my codes.
16th Jan 2017, 3:22 PM
Sergey
+ 10
Thanks.
16th Jan 2017, 3:22 PM
Sergey
+ 9
I have understood. As I know not build function for reverse string.
16th Jan 2017, 3:48 PM
Sergey
+ 9
https://docs.python.org/3/ Read documentations.
16th Jan 2017, 3:51 PM
Sergey
+ 9
Thank you for like my answers You can like my codes too :)
16th Jan 2017, 3:56 PM
Sergey
+ 2
thanks for your help but i want build in function,like python provide reversed function for list but not for string..
16th Jan 2017, 3:05 PM
Mayur Chaudhari
Mayur Chaudhari - avatar
+ 2
yes...
16th Jan 2017, 3:17 PM
Mayur Chaudhari
Mayur Chaudhari - avatar
+ 2
is python support build in(predefine function) for reverse of string..? This is my question..
16th Jan 2017, 3:44 PM
Mayur Chaudhari
Mayur Chaudhari - avatar