![图片[1]-python怎么求list中有多少个元素?-uusu优素-乐高,模型,3d打印,编程](http://uusucn.zbbe.cn/wp-content/uploads/2024/01/5eba0edf0e3be434.jpg)
python中可以使用len()方法求list中有多少个元素。len()方法用于返回列表元素个数。
len()方法语法:
len(list)
示例:
>>>l=['h','e','l','l','o'] >>>len(l) 5原文来自:https://www.py.cn
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END

![图片[1]-python怎么求list中有多少个元素?-uusu优素-乐高,模型,3d打印,编程](http://uusucn.zbbe.cn/wp-content/uploads/2024/01/5eba0edf0e3be434.jpg)
python中可以使用len()方法求list中有多少个元素。len()方法用于返回列表元素个数。
len()方法语法:
len(list)
示例:
>>>l=['h','e','l','l','o'] >>>len(l) 5原文来自:https://www.py.cn
暂无评论内容