空分之家试题及答案.docxVIP

  • 0
  • 0
  • 约5.14千字
  • 约 10页
  • 2026-02-27 发布于山东
  • 举报

空分之家试题及答案

姓名:__________考号:__________

题号

总分

评分

一、单选题(共10题)

1.Python中字符串类型的变量如何进行拼接?()

A.使用加号+

B.使用逗号,

C.使用星号*

D.使用括号()

2.以下哪个是Python中的字典类型?()

A.tuple

B.list

C.dict

D.set

3.如何判断一个变量是否为空?()

A.ifnotvar

B.ifvarisNone

C.ifvar==,0,None

D.alloftheabove

4.Python中for循环的遍历方式是?()

A.foriinrange(len(list))

B.foriinlist

C.foriinlist[1:]

D.foriinlist[:1]

5.如何获取一个元组的长度?()

A.len(tuple)

B.tuple.size

C.tuple.count

D.tuple.length

6.在Python中,如何将一个列表转换为集合?()

A.list2set(list)

B.set(list)

C.convert(list,set)

D.list2set(list)

7.

文档评论(0)

1亿VIP精品文档

相关文档