1. Write a python program to get one word input from the user and then reverse it as another output. The following output can show one of the example
The output is:
Please input a word to reverse it: python
Expected Answer:
nohtyp
Sample Answer:
word = input("Please input a word to reverse it: ") for char in range(len(word) - 1, -1, -1): print(word[char], end="") print("\n")
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)