0

Asking for input until response is valid

How would you go about asking the user for input until they give a valid response in python? Without violating D.R.Y. Thanks in advance!

29th Apr 2019, 8:22 PM
David Quichocho
David Quichocho - avatar
1 Antwort
+ 2
while cycle? Ask for input, check it, if input correct break cycle. But you can't do it here on playground...
29th Apr 2019, 8:36 PM
Dima Makieiev
Dima Makieiev - avatar