I have a file containing lots of python dict. I want to load some of those dict as requested by the user. How cant I do that ?
my_dicts_file.py:
A = { 'value_a': 0,
'value_b':'aa'}
B = { 'value_a': 10,
'value_b':'bb',
'value_c':'Nd'}
....
....
Z = { 'value_4': 50,
'value_t':'0d'}
The following code does not work
for i in ['A','C']:
from my_dicts_file import i
I don't want to load all the dicts if possible with
from my_dicts_file import *