+ 1
Python: The most repeating number
Python: The most repeating number Could someone help me with this? I wanted to create a simple Python program that takes as many values as the user wants, and my program tells me which of these values repeated most Example: 4,7,3,4,5,9,8,7,4 Program: "The most repeated number was 4] Can someone help me? thank you very much
2 Answers
+ 1
look up the "collections" module, scroll down to "counter" then..."most_common" :-
https://docs.python.org/3/library/collections.html#collections.Counter.