Sep-06-2022, 06:10 AM
Is there a way to reduce code down?
for x in resources: if resources[x] < MENU[option]["ingredients"][x]: print(f"Sorry there is not enough {x}") resources_sufficient = FalseI was thinking something like this, but obviously this doesn't work
if resources[x] < MENU[option]["ingredients"[x] for x in resources: print(f"Sorry there is not enough {x}") resources_sufficient = False