Tuesday, February 2, 2021

Python program for reading a string and displaying it in reverse order

 string = input("Enter a string:")

print("The", string, "in reverse order is:")

length = len(string)

for l in range(-1, (-length-1), -1):

print(string[l])

No comments:

Post a Comment

Learning to Appreciate the Right People ❤️ | A Life Lesson About Gratitude, Friendship & Kindness

  https://www.youtube.com/watch?v=FdWsa0QwO2w Hi, namaste camo. So uh recently I have been experiencing this and it has changed a really uh ...