已知aList = [3, 4, 5, 6, 7, 9, 11, 13, 15, 17]则aList[::-1]的结果为:
A. [3, 4, 5, 6, 7, 9, 11, 13, 15, 17]
B. [17, 15, 13, 11, 9, 7, 6, 5, 4, 3]
C. [17]
D. []
查看答案
已知aList = [3, 4, 5, 6, 7, 9, 11, 13, 15, 17]则aList[1::2]的结果为:
A. [4, 6, 9, 13, 17]
B. [3, 4, 5, 6, 7]
C. [3, 4]
D. [3,6,11,17]
已知aList = [3, 4, 5, 6, 7, 9, 11, 13, 15, 17]则aList[3:-10:-1]的值为:
A. [6, 7, 9, 11, 13, 15, 17]
B. [7, 9, 11, 13, 15, 17]
C. [5,4,3]
D. [6, 5, 4]
已知:aList= [3, 5, 7]则aList[len(aList):]结果为()
A. []
B. 报错
C. [3,5,7]
D. [7,5,3]
已知aList = [3, 5, 7]则aList[len(aList):]= [9]实现的是()
A. 在列表尾部增加元素9
B. 在列表头部插入元素9
C. 在列表中间位置插入元素9
D. 修改列表尾部元素为9