从标准输入获取列表:
python 常用input()输入列表数据
操作
child::
python 列表操作
增
- child::append()方法
- child::创建列表
- child::列表合并
删
- child::remove()
- child::del关键字
- child::python pop()方法
改
- child::shuffle()
查找
指向原始笔记的链接
- child::index() 查找索引
- child::count() 元素计数
- child::列表解析
- child::交集
- 以左闭右开的方式提前列表的元素: 在列表后加[x:y]可以抽取列表的元素x到元素y(不包含元素y)的切片
- 如stuff[3:5]#(不包含元素5)
- 列表切片为左闭右开,如[0:-1]为取第一位到倒数第二位
- child::python sample()