I have three dictionaries being used in my program and need to be able to add or remove an item to any of the three dicts. How do I tell the program which dict to add the item to through the use of a variable? I can't simply put "DictName[NewKey] = NewValue" because it depends on which dict the user has chosen.
Example:
Dict1 = {"Key1": "Value1"}
Dict2 = {"Key2": "Value2"}
Dict3 = {"Key3": "Value3"}
var = input("Please choose a dictionary") #Dict1, Dict2, or Dict3
print("Add item to", var)
var[Key4] = Value 4
My issue is that I cant use the variable to call on the dict and change edit it.