Python之列表应用
来源:互联网 发布:react set state 源码 编辑:程序博客网 时间:2024/05/16 12:47
列表元素的追加、排序、删除与查询
storage = ["note","pencil","pen","eraser"]
print("I have ",len(storage),"items")print("This items are:")
for item in storage:
print("item-->",item)
print("\nI also have to buy a ruler")
storage.append("ruler")
print("Now I have :",storage)
print("I want to sort")
storage.sort()
print("After sort :",storage)
print("The first item I have is:",storage[0])
olditem = storage[0]
del storage[0]
print("I lost the ",olditem)
print("After delete:",storage)
阅读全文
0 0
- Python之列表应用
- python---列表应用
- Python 之 列表小结
- python之list列表
- Python之列表数据结构
- python之列表操作
- Python数据类型之列表
- python之列表(list)
- python之列表list
- python基础之列表
- python之列表
- python学习之列表
- Python入门之列表
- python数据类型之列表
- python之列表
- python之列表
- python之列表操作
- python数据结构之列表
- day_03 DayOff
- java笔记作业
- Caffe 特征图可视化
- 专题:强大的运算工具——矩阵
- C++派生类中如何初始化基类对象
- Python之列表应用
- SSM框架整合
- 【专题】归并排序
- C++继承中关于子类构造函数的写法
- Java读写Excel之POI超入门 Apache POI 是用Java编写的免费开源的跨平台的 Java API,Apache POI提供API给Java程式对Microsoft Office格式
- [2017湖南集训7-8]暗牧 虚树+最短路
- js获取get参数
- XML节点与元素
- Rademacher complexity