Nov-03-2019, 09:55 AM
(This post was last modified: Nov-03-2019, 09:55 AM by Gribouillis.)
farispython Wrote:Can I make it to repeat the input when the value is not in the dictionary, instead of being error?Yes, you only need to change 3 lines
if aa not in database: # <--- this first print('Invalid value, try again') continue print(database[aa])