生成一个列表,存放100个随机整数,找出出现次数最多的数字(可能不止一个)
import randomfrom collections import Counterdef randomNum(): num = random.randint(0,100) return numdef findMost(): num_counters = Counter(num) top_common = num_counters.most_comm