squares = [0, 1, 4, 9, 16, 25, 36, 49, 64, 81] print(squares[::2]) print(squares[2:8:3])
结果:
>>> [0, 4, 16, 36, 64] [4, 25] >>>
0