单选题

给定以下代码,d是什么类型的数据结构? D={'name':'John','age':30}

A、

列表

B、

集合

C、

元祖

D、

字典

下载APP答题
由4l***il提供 分享 举报 纠错

相关试题

单选题 如何获取字典中所有的键(keys)?

A、

dict.keys()

B、

dict.values()

C、
D、

单选题 Python中while循环的基本结构是什么?

A、

while condition:
statements

B、

while condition <= true:
statements

C、

while statements:
condition

D、

while:
condition, statements

单选题 在字典操作中,哪个方法可以用来删除并返回字典中的最后一个键值对?

A、

popitem()

B、

pop()

C、

remove()

D、

delitem()

单选题 在Python中,如何正确创建一个空字典?

A、

dic=[ ]

B、

dic={ }

C、

doc=( )

D、

dic=set( )

单选题 以下哪个方法不是字典的内置方法?

A、

get()

B、

update()

C、

append()

D、

clear()

单选题 字典的get()方法的作用是什么?

A、

删除字典中的一个元素

B、

添加一个键值对到字典

C、

返回字典中键对应的值,如果键不存在则返回None

D、

单选题 如何向字典中添加一个新的键值对?

A、

dict.add('height', 175)

B、

dict['height'] = 17

C、

dict.append({'height': 175})

D、

dict.insert(0, 'height', 175)

单选题 如何检查一个键是否存在于字典中?

A、

dict.has_key('key')

B、

'key' in dict

C、

dict.contains('key')

D、