i'd like to know how to populate an empty dictionary with other dictionaries in the manner below:
newdict = {}
dict1 = {"key1": "value1"}
dict2 = {"key2": "value2"}
dict3 = {"key3": "value3", "key4": "value4"}
dicts_to_use = [dict1, dict3]
so a list is used to specify which ones to include, and newdict in this case should be populated such that it would show:
{'dict1': {'key1': 'value1'}, 'dict3': {'key3': 'value3', 'key4': 'value4'}}
im running into trouble referring to the dictionaries in the list and crossing across string/dictionary types