python切片操作
提问人:杨紫红发布时间:2020-11-26
切片操作
a = [2, 3, 4, 5, 6]
a[:2] #[2, 3]
a[2:] #[4, 5, 6]
a[2:4] #[4, 5]
a[:] # [2, 3, 4, 5, 6]
继续查找其他问题的答案?
相关视频回答
回复(0)
切片操作
a = [2, 3, 4, 5, 6]
a[:2] #[2, 3]
a[2:] #[4, 5, 6]
a[2:4] #[4, 5]
a[:] # [2, 3, 4, 5, 6]
点击加载更多评论>>