题目内容

student = dict(姓名='张三', 年龄=20, 性别='男') for s in student: print(s)的结果是?

A.姓名:张三年龄:20性别:男
B.张三20男
C.姓名 年龄 性别
D.报错

查看答案
更多问题

student = dict(姓名='张三', 年龄=20, 性别='男'),则student.get("name", "Not Found")的结果是?

A.张三
B.20
C.男
D.Not Found

将字典作为max的参数时,max函数的功能是?

A.返回字典键中的最大值
B.返回字典键中的最小值
C.返回字典值中的最大值
D.返回字典值中的最小值

dict = {'a': 1, 'b': 2, 'b': '3'}print(dict)上述程序运行后的结果是:

A.dict = {'a': 1, 'b': 2, 'b': '3'}
B.dict = {'a': 1, 'b': '3'}
C.dict = {'a': 1, 'b': 2}
D.报错

dict = {'a': 1, 'b': 2, 'c': '3'}dict.popitem()print(dict)上述程序运行后的结果是:

A.{'a': 1}
B.{ 'b': 2, 'c': '3'}
C.{'a':1', 'c': '3'}
D.{'a':1', 'b': 2,}

答案查题题库