题库 python等级考试 题目列表 执行以下代码后输出的结果是?( ) d={1:'m...
单选题

执行以下代码后输出的结果是?( ) 

d={1:'monkey',2:'panda',3:'bird',4:'fish'} 
d[5]='sheep' 
del d[3] 
d[3]='dog'
print(d)
A.

{1: 'monkey', 2: 'panda', 4: 'fish', 5: 'sheep', 3: 'cat'}

B.

{1: 'monkey', 2: 'panda', 4: 'fish', 5: 'sheep', 3: 'dog'}

C.

{1: 'monkey', 2: 'panda', 3: 'dog, 5: 'sheep', 4: 'duck'}

D.

{1: 'monkey', 2: 'panda', 3: 'cat', 5: 'sheep', 4: 'duck'}

题目信息
字典 二级知识块 2022年9月 一般
-
正确率
0
评论
27
点击