8楼正解,调整代码如下,
程序代码:
# alien_0={"color":"green","points":5,"speed":"slow"} aliens=[] for alien_number in range(3): alien_0 = {"color": "green", "points": 5, "speed": "slow"} aliens.append(alien_0) for alien in aliens[0:1]: if alien['color']=='green': alien['color']='yellow' alien['points']=10 alien['speed']='medium' for alien in aliens[:3]: print(alien) print('...')