I'm facing a problem with an game that i'm working on. In this game, players need to choose a number and vote. So let's say that 5 players are playing, when they vote and the votation ends, the game returns the mode of the votes. I can get the mode with max(set(int_list), key=int_list.count) where int_list is a list that i'm using to store the votes.
But if the votes list is something like [1,1,2,2,3] or [1,1,2,2] I get 1 as the mode, but I'd like a condition to check theses cases and return a message "inconclusive mode" or something like that.
The mode is the value that appears most often in a set of data values.
How can i make this condition? I'm using Python btw