I am current converting a list of Objects to a dict using this command:
MODULES = dict([(s.key, s) for s in ALL_MODULES])
Each module in ALL_MODULES is enabled=True or enabled=False
How would I change the above code to only include the modules with enabled=True?
try this:
or
Depends on module data type.