Skip to content

Latest commit

 

History

History
13 lines (10 loc) · 245 Bytes

break_out.md

File metadata and controls

13 lines (10 loc) · 245 Bytes

Break Out

Write a loop that will keep reversing user's input until he enters the letter 'q' to quit

Solution

while True:
  ans = input("Please insert a string to reverse: ")
  if ans == 'q':
      break
  print(ans[::-1])