单选题
适中
#4167
有如下Python程序段: stu=dict(name="张明明",age=10) stu['sex']="男" for i in stu.values():…
有如下Python程序段:
stu=dict(name="张明明",age=10) stu['sex']="男" for i in stu.values(): print(i,end=" ")
执行程序后,输出的结果为?( )
答案与解析
正确答案:B
解析
本题考核字典的元素的添加与字典值的遍历。