The len()
function can be used with several different types in Python - both built-in types and library types.
(len()
函数可与Python中的几种不同类型一起使用-内置类型和库类型。)
For example: (例如:)
>>> len([1,2,3])
3
Official 2.x documentation is here: len()
(官方2.x文档在这里: len()
)
Official 3.x documentation is here: len()
(正式的3.x文档在这里: len()
)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…