当前位置:网站首页>Section 7 of Chapter 2: the concept of list
Section 7 of Chapter 2: the concept of list
2022-07-21 15:15:00 【Zhongyifeng Digital Technology Co., Ltd】
Python Basic introduction ( A full set of nanny level tutorials )
Chapter two
Section 7 : The concept of list
list
Definition : Something that can hold things
stay python of use [ ] To represent a list . The elements in the list pass through , separate
1. Like strings, there are indexes and slices
2. If the index exceeds the range, an error will be reported
3. It can be used for Loop through
4. use len You can get the length of the list
a = [" Zhang Sanfeng ", " zhang wuji ", " Zhang Shaogang ", [1,2,3,True, ]]
# stay python of use [] To represent a list . The elements in the list pass through , separate
lst = [" The Golden Lion ", " Zhang Shaogang ", " zhang wuji ", " Guo Qilin "]
print(lst[0])
print(lst[1:3])
print(lst[::-1])
print(lst[3652])
for item in lst:
print(item)
print(len(lst))
Take a brief look at the list , Add, delete, modify and check the teaching list in the next section ..
边栏推荐
- evil spirits
- 【CVA估值训练营】读懂上市公司年报_第二讲
- DAMA-第十二章(元数据管理)
- Intel assembly language programming learning - Chapter 5 process - Part 1
- [public class preview]: cloud video conference system privatization practice
- NFS共享存储服务
- How to ensure data security while saving 30% disk space in tdsql PG version DB · insight
- 长城证券手机软件线上炒股开户证券公司佣金低?开户安全吗?
- [CVA valuation training camp] read the annual reports of listed companies_ Lesson 2
- [untitled]
猜你喜欢
乘数科技云管控平台适配阿里云 PolarDB,共促云原生数据库生态繁荣
【小程序】快来开发你的第一个微信小游戏(详细流程)
Winform窗体使用Assembly实例化及传参
第二章第十节:列表的补充知识点
TCP sliding window explanation (very practical)
第二章第三节:字符串常规操作
Mysql的主键UUID、自增ID、雪花算法到底该怎么选择?(荣耀典藏版)
Lora技术助力冷链发展
Visual Studio 好用的插件分享
Opportunities and challenges coexist for financial enterprises to go to sea in emerging markets, advance AI ensures its safety and compliance development
随机推荐
第二章第十节:列表的补充知识点
DAM-第十三章(数据质量管理)
mysql数据900W+从17s到300ms是怎么做到的?sql优化的魅力(荣耀典藏版)
xshell 判断文件超出指定大小则清空文件
TDSQL PG版节省30%磁盘空间的同时如何保障数据安全?|DB·洞见
从表面看,元宇宙可能将从根本上改变人们的生产和生活方式
【二叉树】分裂二叉树的最大乘积
第二章 第五节:查找和判断
Networkx visualization graph how to get a graph based on time series
Detailed explanation of TCP communication concurrent server (with case code)
从去IOE到CIPU,中国云计算要走出自己的路径
leetcode:407. Connected to rainwater II
【LeetCode】29、 两数相除
【CVA估值训练营】读懂上市公司年报_第二讲
同一工作空间下引用不同包的头文件
【快速上手教程3】疯壳·开源编队无人机-开发环境搭建
发票自动处理——摆脱纸张和数据输入的束缚,自动化工作流程和异常处理,大幅缩短审核准备时间
第二章 第十四节:字典的概念
巧用RoaringBitMap处理海量数据内存diff问题
Expose the insider of Apache Doris data Lake analysis technology? Rare earth Developers Conference free registration!