:是slice语法的定界符,用于“分割”序列中的子部分,
[start:end]
[1:5] is equivalent to "from 1 to 5" (5 not included)[1:] is equivalent to "1 to end"[len(a):] is equivalent to "from length of a to end"
也适用于元组和字符串。

:是slice语法的定界符,用于“分割”序列中的子部分,
[start:end]
[1:5] is equivalent to "from 1 to 5" (5 not included)[1:] is equivalent to "1 to end"[len(a):] is equivalent to "from length of a to end"
也适用于元组和字符串。