a[::-1]
反转
元组()
a=(1,2,3,4)
a[::-1]=(4,3,2,1)
列表[]
b=[1,2,3,4]
b[::-1] = [4,3,2,1]
a[:-1]
切片
a[:-1] = (1,2,3)
b[:-1] = [1,2,3]