Advertisement
Guest User

Untitled

a guest
Dec 7th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. # get input text
  2. print("Input the text (. to exit): ")
  3. input_text = ""
  4. cur_input_text = ""
  5. while True:
  6. cur_input_text = input("> ")
  7. if cur_input_text == ".":
  8. if not input_text:
  9. print("ERROR: The text has to consist of more than 0 chars "
  10. "and can not be a single dot.")
  11. else:
  12. break
  13. input_text += "\n" + cur_input_text
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement