+ 1

How to reverse the alphabets ?

How can i reverse the alphabets of a whole sentence that i got from users?

29th Oct 2020, 7:02 AM
tara
tara - avatar
5 Respuestas
+ 9
Reversing any kind of string can also be done by using reversed() function: chars = 'abcdefghijklmnopqrstuvwxyz' chars_rev = reversed(chars) print(''.join(chars_rev))
29th Oct 2020, 11:00 AM
Lothar
Lothar - avatar
+ 7
print(input()[::-1])
29th Oct 2020, 7:12 AM
TOLUENE
TOLUENE - avatar
+ 4
You mean reverse a string input by users?
29th Oct 2020, 7:06 AM
你知道規則,我也是
你知道規則,我也是 - avatar
+ 2
Reverse alphabet as in a -> z and A -> Z? What you mean by "not just words"? you mean reverse each word in sentence and the alphabets also? Is this a code coach problem?
29th Oct 2020, 10:32 AM
Ipang
+ 1
CarrieForle yes. And the alphabets not just words
29th Oct 2020, 8:18 AM
tara
tara - avatar