The World Wide Web, restored to 800 pixels of glory.
GeezerVison is showing www.runoob.com — Python len()方法 | 菜鸟教程
Python 内置函数
Python len() 方法返回对象(字符、列表、元组等)长度或项目个数。
len()方法语法:
len( s )
返回对象长度。
以下实例展示了 len() 的使用方法:
执行以上代码,输出结果为:
6 5
取消