01
以下程序输出的结果为:
I = []
for i in range(4):
I.append({"num":i})
print(I)
输出为 : [{‘num’: 0}, {‘num’: 1}, {‘num’: 2}, {‘num’: 3}]
02
I=[]
a={"num":0}
for i in range(4):
a["num"] = i
I.append(a)
print(I)
输出为 : [{‘num’: 3}, {‘num’: 3}, {‘num’: 3}, {‘num’: 3}]