I\'m new in programming and I have an issue when doing the input validation.
My program requires to input number from 1 to 10 or the letter y but it seems that
def checkingInput():
while True:
try:
a = input('enter')
if a == 'y' or 1 <= int(a) <= 10:
return a
else:
print('Invalid input!')
except ValueError:
print('Value error! Please try again!')