对列表施以切片操作,有如下例子,请在指指定位置写出切片操作的结果。 >>>>alist = [1,3,5,7,8,10,12,17] blist = alist[:] >>>>alist[:] >>>blist is alist >>>alist[::-1] >>>blist = alist >>>blist is alist >>>>alist[1::2]
时间: 2023-03-13 21:19:24 浏览: 144
blist结果为[1, 3, 5, 7, 8, 10, 12, 17], alist[::-1]结果为[17, 12, 10, 8, 7, 5, 3, 1],alist[1::2]结果为[3, 5, 7, 10, 17]。
阅读全文