Dec-28-2021, 08:04 PM
(This post was last modified: Dec-28-2021, 08:04 PM by BashBedlam.)
(Dec-28-2021, 12:58 PM)3lnyn0 Wrote: Can you explain this line 'acceptable_options = {'1': 0, '2': 1, '3': 2, '4': 3, '0': 4}'?I'm using a dictionary to lookup the indexes for
menu_tuple
. I did that for two reasons.1) So I don't have to convert the input from a string to an integer
2) Zero is the fourth element in
menu_tuple
.Edit:
3) It filters unwanted input like '7'.