擅长:python、mysql、java
<p>正如其他人所指出的,你是在同一个词汇后面加上这个词</p>
<p>使用复制模块中的deepcopy。你知道吗</p>
<pre><code>import copy
x = 2
y = []
z = { "player" : 0, "name": "none", "fired": 0, "hits": 0, "misses": 0, "streak": 0, "longest streak": 0 }
def number_player(x, y, z):
for i in range(x):
y.append(copy.deepcopy(z))
y[i]["player"] = (i + 1)
number_player(x, y, z)
print y
</code></pre>