Write a Python program that accepts a word from the user and reverse it
I have used python 3.7 compiler for debugging purpose.
word = input("Input a word to reverse: ") for char in range(len(word) - 1, -1, -1): print(word[char], end="") print("\n")
Result:
Input a word to reverse: techstudy
ydutshcet
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
I have used python 3.7 compiler for debugging purpose.
Result:
Input a word to reverse: techstudy
ydutshcet
need an explanation for this answer? contact us directly to get an explanation for this answer