在Python 中怎么表示一个元素在一个list中的数量?

commonest = [1,2,2,2,1,3,4,5,1,1]

print(commonest.count(1))
posted @ 2017-11-28 15:16  Johnson_Yuan  阅读(7100)  评论(0)    收藏  举报