Advertisement
Guest User

Untitled

a guest
Oct 18th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. mode = []
  2. highestCount = 0
  3. for i in input_list:
  4. if (input_list.count(i) > 1):
  5. if (input_list.count(i) > highestCount):
  6. mode = []
  7. mode.append(i)
  8. highestCount = input_list.count(i)
  9. if (input_list.count(i) == highestCount):
  10. mode.append(i)
  11. mode = list(set(mode))
  12. mode = list_sort(mode)
  13. return mode
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement