网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
将一个字典的键、值互换,例如{160: 'Aric', 168: 'Lily', 155: 'Mary'},转换为{'Aric': 160, 'Lily': 168, 'Mary': 155},下面应填入的代码是()。 d_src = {160: 'Aric', 168: 'Lily', 155: 'Mary'} d_dst = {} for 空1 in 空2 : 空2 print(d_dst) 知识点:字典
A.空1:key, value 空2:d_src.items() 空3:d_dst[value] = key
B.空1:key, value 空2:d_src.items() 空3:d_dst[key] = value
C.空1:key 空2:d_src.keys() 空3:d_dst[ d_src[key] ] = key
D.空1:key, value 空2:d_src.values() 空3:d_dst[ value ] = key
参考答案和解析
空1:key, value 空2:d_src.items() 空3:d_dst[value] = key;空1:key 空2:d_src.keys() 空3:d_dst[ d_src[key] ] = key
更多 “将一个字典的键、值互换,例如{160: 'Aric', 168: 'Lily', 155: 'Mary'},转换为{'Aric': 160, 'Lily': 168, 'Mary': 155},下面应填入的代码是()。 d_src = {160: 'Aric', 168: 'Lily', 155: 'Mary'} d_dst = {} for 空1 in 空2 : 空2 print(d_dst) 知识点:字典A.空1:key, value 空2:d_src.items() 空3:d_dst[value] = keyB.空1:key, value 空2:d_src.items() 空3:d_dst[key] = valueC.空1:key 空2:d_src.keys() 空3:d_dst[ d_src[key] ] = keyD.空1:key, value 空2:d_src.values() 空3:d_dst[ value ] = key” 相关考题
考题
9.—Do Lily and Lucy__________,Mary?—Yes,they doA.look sameB.look the sameC. look likeD.look the same as
考题
——Mary, you clean the room today, ?——But I cleaned it yesterday. It’s Lily’s turn.A、don’t youB、will youC、do youD、didn’t you
考题
21. This is ________ room. The twin sisters like it very much.A. Lucy's and Lily'sB. Lucy's and LilyC. Lucy and Lily'sD. Lucy and Lily
考题
● 报文摘要算法MD5 的输出是 (45)位,SHA-1的输出是 (46) 位。(45)A. 56B. 128C. 160D. 168(46)A. 56B. 128C. 160D. 168
考题
白海芋是指下列哪一种花材?()A、Calla Lily HighwoodB、Lilium az BrunelloC、Calla Lily ChildsianaD、Easter Lily
考题
单选题某学校10000名女生身高服从正态分布,其均值为160cm,标准差为5cm,其中6827名女生身高的可能范围是( )。A
160-165cmB
150-170cmC
155-165cmD
155-160cm
考题
单选题Mary doesn’t like blue _____ red. But _____.A
or; Lily doesB
and; does LilyC
nor; Lily isD
neither; is Lily
考题
单选题三号线正线S700K双机牵引道岔A机开程为:()。A
155±2mmB
160±2mmC
155±5mmD
160±5mm
热门标签
最新试卷