题目内容

Python 中,以下哪个代码是正确的列表?

A. sampleList = {1,2,3,4,5}
B. sampleList = (1,2,3,4,5)
C. sampleList = /1,2,3,4,5/
D. sampleList = [1,2,3,4,5]

查看答案
更多问题

Python 中,以下哪个代码是正确的元组?

A. sampleList = (1,2,3,4,5)
B. sampleList = {1,2,3,4,5}
C. sampleList = [1,2,3,4,5]
D. sampleList = /1,2,3,4,5/

Python 中,以下哪个变量的赋值是正确的?

A. var a = 2
B. int a = 2
C. a = 2
D. variable a = 2

变量 a 的值为字符串类型的 "2",如何将它转换为整型?

A. castToInt(a)
B. int(a)
C. integer(a)
D. castToInteger(a)

Python 中,以下哪个赋值操作符是错误的?

A. +=
B. -=
C. *=
D. X=

答案查题题库