New course! Every coder should learn Generative AI!
Try a free lesson0
How to reverse a string in python..??
Suppose the input is "hello guys".. output should be- olleh syug
1 Answer
+ 4
for w in "hello guys".split(): print(w[::-1], end=" ")
Suppose the input is "hello guys".. output should be- olleh syug