教程集 www.jiaochengji.com
教程集 >  Python编程  >  Python入门  >  正文 python中len是什么

python中len是什么

发布时间:2021-04-20   编辑:jiaochengji.com
教程集为您提供python中len是什么等资源,欢迎您收藏本站,我们将为您提供最新的python中len是什么资源

Python len() 方法返回字符串长度。

len()方法语法:

len( str )

相关推荐:《Python教程

返回值:

返回字符串长度。

以下实例展示了len()的使用方法:

#!/usr/bin/python
str = "this is string example....wow!!!";
print "字符串长度: ", len(str);

以上实例输出结果如下:

字符串长度: 32

您可能感兴趣的文章:
python里len什么意思
python中len是什么
python len什么意思
python中while 1表示什么
什么是Python的字符串
中文在python中占几个字节
python中index是什么意思
python index函数是什么意思
Python列表中extend和append有什么区别?
怎么使用python脚本实现表格打印?

[关闭]
~ ~