day前端_总结

nums = [1, 2, 3, 1, 4, 2, 1, 3, 7, 3, 3]
counts = []
a = []
for index1 in range(len(nums)):
if nums[index1] not in a:
a.append(nums[index1])
count = 0
for index2 in range(len(nums)):
if nums[index1] == nums[index2]:
count += 1
counts.append(count)
for x in range(len(a)):
if counts[x] == max(counts):
print(a[x])

你可能感兴趣的:(day前端_总结)