教程集 www.jiaochengji.com
教程集 >  脚本编程  >  php  >  正文 python里len什么意思

python里len什么意思

发布时间:2020-11-09   编辑:jiaochengji.com
教程集为您提供python里len什么意思等资源,欢迎您收藏本站,我们将为您提供最新的python里len什么意思资源

python中的len()方法

Python len() 方法返回对象(字符、列表、元组等)长度或项目个数。

语法

len()方法语法:

len( s )

参数

s -- 对象。

返回值

返回对象长度。

实例

>>>str = "runoob"
>>> len(str)             # 字符串长度
6
>>> l = [1,2,3,4,5]
>>> len(l)               # 列表元素个数
5

以上就是python里len什么意思的详细内容,更多请关注教程集其它相关文章!

  • 本文原创发布教程集,转载请注明出处,感谢您的尊重!
  • 您可能感兴趣的文章:
    python里len什么意思
    python len什么意思
    python中r代表什么意思
    python里//什么意思
    python setup.py install是什么意思
    r在python中表示什么意思
    python正则表达式r表示什么意思
    python里int什么意思
    python里print是什么意思
    int在python中什么意思

    [关闭]
    ~ ~