Skip to content

Instantly share code, notes, and snippets.

@Andygmb
Forked from anonymous/gist:4ba22acea589404b7162
Last active August 29, 2015 14:15
Show Gist options
  • Save Andygmb/b567ce5efd30524960b7 to your computer and use it in GitHub Desktop.
Save Andygmb/b567ce5efd30524960b7 to your computer and use it in GitHub Desktop.
def winner(votes):
return max(votes, key = votes.count)
winner([1,1,2,2,2,2,2,3])
>>> 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment