我正在尝试在当前代码中的字典中添加字典,就像这样!
i = 0
A ={}
x = [...]
for i in x:
(a,b) = func(x)#this returns two different Dictionaries as a and b
for key in a.keys():
A[key] = {}
A[key][i] = a[key]
print('A:',A)
当我执行它时,我得到了' A'整个循环中打印的字典!但是,我需要在一个字典中说:" C" 我该怎么做?