2026年niit考试试题含答案解析.docxVIP

  • 0
  • 0
  • 约5.23千字
  • 约 9页
  • 2026-03-04 发布于中国
  • 举报

2026年niit考试试题含答案解析

姓名:__________考号:__________

一、单选题(共10题)

1.Python中,下列哪个是布尔类型的数据类型?()

A.int

B.float

C.bool

D.str

2.在Python中,如何定义一个列表?()

A.list=[1,2,3]

B.array=(1,2,3)

C.tuple=[1,2,3]

D.dict={1,2,3}

3.在Python中,如何获取字符串的长度?()

A.len(string)

B.string.size

C.string.length

D.string.count

4.在Python中,下列哪个是元组类型的数据类型?()

A.list

B.tuple

C.dict

D.set

5.在Python中,如何遍历一个字典的所有键?()

A.forkeyindictionary

B.forkeyindictionary.keys()

C.forkeyindictionary.values()

D.forkeyindictionary.items()

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

A.dellist[1]

B.l

文档评论(0)

1亿VIP精品文档

相关文档