Enter choice:'''
while True:
while True:
try:
choice=input(pr).strip()[0].lower()
print(choice)
except (EOFError,KeyboardInterrupt,IndexError):
choice='q'
print('\nYou picked:[%s]'%choice)
if choice not in 'uovq':
print('Invalid option,try again')
else:
break
if choice=='q':
break