题目内容

Will the humanities be out of date?

查看答案
更多问题

现有a = [1, 2, 3, 4, 5],则a[:-1:3]的值是多少?

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

现有a = [1, 2, 3, 4],则a[::-1]的值是多少?

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

现有a = [1, 2, 3, 4, 5],则a[-4: -1: 2]的值是多少?

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

假设列表对象aList的值为[3, 4, 5, 6, 7, 9, 11, 13, 15, 17],那么切片aList[3:7]得到的值是( )。

A. [5, 6, 7, 9]
B. (5, 6, 7, 9)
C. (6, 7, 9, 11)
D. [6, 7, 9, 11]

答案查题题库