题目内容

print(list(range(1,6))的结果是

A. [0,1,2,3,4,5,6]
B. [0,1,2,3,4,5]
C. [1,2,3,4,5,6]
D. [1,2,3,4,5]

查看答案
更多问题

print([x * x for x in range(9) if x % 4 == 0])的结果是

A. [0,16,64]
B. [0,4,8]
C. [0,1,2,3,4,5,6,7,8]
D. [0,1,4,9,16,36,49,64]

a = [1, 4, 3, 2]a.insert(2, "nice")print(a)程序的输出结果是

A. [1,"nice",3,2]
B. [1, 4, 'nice', 3, 2]
C. [1,"nice",4,3,2]
D. [1, 4, 'nice', 2]

a = [1, 4, 3, 2]a[2]= "nice"print(a)程序的输出结果是

A. [1,"nice",3,2]
B. [1,"nice",4,3,2]
C. [1,4,"nice",2]
D. [1,4,"nice",3,2]

a = [1, 2, 3, 4]a.pop()print(a)print(a.pop(-2))print(a)a.pop(0)print(a)以上程序的输出结果是

A. [1, 2, 3]2[1, 3][3]
B. [1,2,3,4]3[1,2,3,4][1,2,3,4]
C. [1,2,3]3[1,2,4][2,3,4]
D. [1, 2, 3]2[1, 3]3

答案查题题库