📜  is : 和 :: 在 python slice 中相同 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:01.946000             🧑  作者: Mango

代码示例2
a[::-1]    # all items in the array, reversed
a[1::-1]   # the first two items, reversed
a[:-3:-1]  # the last two items, reversed
a[-3::-1]  # everything except the last two items, reversed