- 2
- 0
- 约4.47千字
- 约 8页
- 2026-06-20 发布于山东
- 举报
环境与我们测试题
姓名:__________考号:__________
一、单选题(共10题)
1.以下哪个是Python中的基本数据类型?()
A.字符串
B.列表
C.字典
D.函数
2.在Python中,如何定义一个变量?()
A.vara=1
B.a=1
C.definea:a=1
D.variablea=1
3.以下哪个不是Python中的关键字?()
A.if
B.class
C.import
D.while
4.Python中的for循环通常用于遍历哪种数据结构?()
A.字符串
B.列表
C.字典
D.元组
5.在Python中,如何删除一个列表中的元素?()
A.remove(item)
B.delete(item)
C.erase(item)
D.del(item)
6.以下哪个是Python中的列表推导式?()
A.[xforxinrange(5)]
B.{xforxinrange(5)}
C.(xforxinrange(5))
D.{x:xforxinrange(5)}
7.在Python中,如何获取当前时间?()
A.time.current_time()
B.datetime.
原创力文档

文档评论(0)