对python中的list元素计数

来源:互联网 发布:windows 10 磁盘加密 编辑:程序博客网 时间:2024/05/18 06:25

使用API:list.count(a),示例如下:

[1,2,3,4,4,3,2,1].count(1)



0 0
原创粉丝点击