Python3 len()方法
Python 3 教程
· 2019-02-05 23:43:50
描述
Python len() 方法返回对象(字符、列表、元组等)长度或项目个数。
语法
len()方法语法:
len( s )
参数
- s -- 对象。
返回值
返回对象长度。
实例
以下实例展示了 len() 的使用方法:
>>>str = "codercto"
>>> len(str) # 字符串长度
6
>>> l = [1,2,3,4,5]
>>> len(l) # 列表元素个数
5
点击查看所有 Python 3 教程 文章: https://codercto.com/courses/l/10.html
Designing Data-Intensive Applications
Martin Kleppmann / O'Reilly Media / 2017-4-2 / USD 44.99
Data is at the center of many challenges in system design today. Difficult issues need to be figured out, such as scalability, consistency, reliability, efficiency, and maintainability. In addition, w......一起来看看 《Designing Data-Intensive Applications》 这本书的介绍吧!