python函数中参数
发布时间: 2025-03-12 04:38:11
❶ python中len函数
Python len() 方法返回字符串长度。
len()方法语法:
len( str )
返回值:
返回字符串长度。
以下实例展示了len()的使用方法:
#!/usr/bin/python
str = "this is string example....wow!!!";
print "字符串长度: ", len(str);
以上实例输出结果如下:
字符串长度: 32
热点内容