擅长:python、mysql、java
<p>在循环的每个过程中,都将字典重新定义为空。代码应该是。</p>
<pre><code>pupils_dictionary = {}
for x in range(3):
new_key =input('Enter new key: ')
new_age = input('Enter new age: ')
pupils_dictionary[new_key] = new_age
print(pupils_dictionary)
</code></pre>