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

时间:2022-01-25 15:28:22

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

print(commonest.count(1))

相关文章