I have some large number of boolean values e.g
bool1 = False
bool2 = False
...
booln = False
User runs the program and provides the name of a bool to be set to True
. E.g python run.py bool100
.
Is there a way to implement it in one or few lines without having n-depth if elif
statement?
Thank you
EDIT: clarification -- these are plain bool variables and I cannot convert them into dictionaries or lists