习题2:师说_原创精品文档.docxVIP

  • 1
  • 0
  • 约3.98千字
  • 约 8页
  • 2026-07-25 发布于中国
  • 举报

习题2:师说

姓名:__________考号:__________

题号

总分

评分

一、单选题(共10题)

1.以下哪个是Python中定义函数的关键字?()

A.class

B.def

C.if

D.else

2.Python中字符串类型的数据是以哪种形式存储的?()

A.数组

B.字典

C.链表

D.栈

3.在Python中,如何判断一个变量是否是列表类型?()

A.isinstance(variable,list)

B.is_list(variable)

C.variableinlist

D.type(variable)==list

4.在Python中,如何生成一个空字典?()

A.dict()

B.new_dict

C.{}

D.dictionary()

5.以下哪个不是Python中的关键字?()

A.import

B.true

C.none

D.and

6.在Python中,如何删除列表中的最后一个元素?()

A.pop

B.remove

C.del

D.shift

7.在Python中,如何获取字符串中最后一个字符?()

A.string[-1]

B.string.last

C.string[-len(strin

文档评论(0)

1亿VIP精品文档

相关文档