Advertisement
Hppavilion1

Python loop for correct input

Jan 11th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.11 KB | None | 0 0
  1. inp = input(prompt)
  2. while not correct(inp):
  3.     print('input was incorrect, please try again')
  4.     inp = input(prompt)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement