How to reverse a string in python..?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to reverse a string in python..??

Suppose the input is "hello guys".. output should be- olleh syug

6th Aug 2022, 10:16 PM
Augnila Acharjee
Augnila Acharjee - avatar
1 Answer
+ 4
for w in "hello guys".split(): print(w[::-1], end=" ")
6th Aug 2022, 10:28 PM
SoloProg
SoloProg - avatar