I want to call different parts from a dict depending on variable.
import fruitList
fruit = 'Banana'
if fruitList.fruit['Color'] == "Yellow":
print "True"
else:
print "False"
But this does not work, AttributeError: 'module' object has no attribute 'fruit'
I know i could simply do:
if fruit == "Banana":
var = fruitList.Banana
But that is what iam trying to get away from since it becomes to static for my purposes.