python如何找到列表中出現最頻繁的數

找到列表中出現最頻繁的數

test=?[1,2,3,4,2,2,3,1,4,4,4] print(max(set(test),key=test.count)) #->?4

python有哪些常用庫

python常用的庫:1.requesuts;2.scrapy;3.pillow;4.twisted;5.numpy;6.matplotlib;7.pygama;8.ipyhton等。

? 版權聲明
THE END
喜歡就支持一下吧
點贊13 分享