小编Pet*_*r S的帖子

这种表示法对Python中的列表有什么作用:"someList [:]"?

我有时会遇到这种打印或返回列表的方式 - someList[:].我不明白为什么人们会使用它,因为它返回完整列表.

为什么不简单地写someList,没有[:]部分?

python list notation shallow-copy slice

32
推荐指数
3
解决办法
2555
查看次数

标签 统计

list ×1

notation ×1

python ×1

shallow-copy ×1

slice ×1