Write a program that takes in a line of text as input, and outputs that line of text in reverse. The program repeats, ending when the user enters "Quit", "quit", or "q" for the line of text.
Ex: If the input is:
Hello there
Hey
quit
then the output is:
ereht olleH
yeH
''' I am having trouble with this problem and my teacher has not been able to explain things well at all. I have been able to print out one input in reverse, but I am not sure how to print out all of them and break the loop with a 'q', 'quit', or 'Quit'. Please help.
My code so far:
mystring = str(input())
myreverse = ''
for i in mystring:
myreverse= i+ myreverse
print(myreverse)