单选题
适中
#4256
执行以下代码后输出的结果是?( ) d = { 1 : 'monkey' , 2 : 'panda' , 3 : 'bird' , 4 : 'fish' } d…
执行以下代码后输出的结果是?( )
答案与解析
正确答案:B
解析
d[5]='sheep' #{1: 'monkey', 2: 'panda', 3: 'bird', 4: 'fish', 5: 'sheep'} del d[3] #{1: 'monkey', 2: 'panda', 4: 'fish', 5: 'sheep'} d[3]='dog'#{1: 'monkey', 2: 'panda', 3: 'dog', 5: 'sheep'} d[3]='dog'#{1: 'monkey', 2: 'panda', 4: 'fish', 5: 'sheep', 3: 'dog'}