It often depend on whether you need to access the variables programmatically
e.g. in a generic menu routine - it is sometime easier to be able to refer to the variable by number :-if there's any chance the list could get shuffled by accident , then perhaps a dictionary might be a better option :-And, there always the option of wrapping the lot into a class and have all the control ever need ![Smile :-)]()
e.g. in a generic menu routine - it is sometime easier to be able to refer to the variable by number :-
Code:
timelist[ menu_number]
Code:
timedict = {"morningstart": 0, "morningend":0, "eveningstart":0, "eveningend":0}

Statistics: Posted by BillTodd — Tue Jan 23, 2024 9:21 pm