python中的列表问题

img


python中的列表问题,列表出现次数最多的值,如何找到,在线求解

一行代码就能搞定:

 print(max([nums.count(i) for i in nums]))