- 1
- 0
- 约3.36千字
- 约 10页
- 2026-04-07 发布于河南
- 举报
计算机二级Python2026年押题含解析冲刺押题
考试时间:______分钟总分:______分姓名:______
一、选择题(每小题1分,共20分)
1.在Python中,用于定义函数的关键字是()。
A.def
B.function
C.fun
D.define
2.下列哪个不是Python的基本数据类型?()
A.int
B.float
C.string
D.boolean
3.在Python中,如何正确地注释一行代码?()
A.//
B.#
C./*
D.--
4.下列哪个选项是Python中的真值?()
A.0
B.None
C.False
D.hello
5.Python中,列表的默认排序方法是()。
A.sort()
B.sorted()
C.order()
D.arrange()
6.在Python中,如何从字符串中提取子字符串?()
A.split()
B.substring()
C.slice()
D.extract()
7.下列哪个选项是Python中的迭代器?()
A.list
B.tuple
C.set
D.alloftheabove
8.在Python中,如何打开一个文件进行读写操作?()
A.open()
B.openfile()
C.
原创力文档

文档评论(0)