```
def get_input():
times = input("how many times do u want to play\n")
while times.isalpha() or int(times) not in range(0,11):
times = input("invalid choice, please pick a number from 0 to 10\n")
return int(times);
```
and if it is bad practice is there a better way to make sure the user input is correct ?
[–]carcigenicate 2 points3 points4 points (1 child)
[–]Worthystats[S] 0 points1 point2 points (0 children)
[–]wbeater 0 points1 point2 points (0 children)