Sequence序列
1.序列操作
seq[ind1:ind2]
seq[ind]
seq1 + seq2
seq1 * seq2
seq * n
obj in seq
obj not in seq
2.切片操作
#反转操作
seq[::-1]
#隔一个取一个
seq[::2]
#取全部
seq[:None]
时间: 2024-10-08 10:41:58
Sequence序列
1.序列操作
seq[ind1:ind2]
seq[ind]
seq1 + seq2
seq1 * seq2
seq * n
obj in seq
obj not in seq
2.切片操作
#反转操作
seq[::-1]
#隔一个取一个
seq[::2]
#取全部
seq[:None]