[Solved] Generate Dictionary in Python at run time [closed]
[ad_1] You can use the dict constructor d = dict(key1=val1, key2=val2) or __setitem__ method d = {} d[‘key1’] = val1 d[‘key2’] = val2 There are other, even more flexible ways, but those are the basics. [ad_2] solved Generate Dictionary in Python at run time [closed]