Skip to content

Instantly share code, notes, and snippets.

Created February 22, 2015 12:32
Show Gist options
  • Save anonymous/4ba22acea589404b7162 to your computer and use it in GitHub Desktop.
Save anonymous/4ba22acea589404b7162 to your computer and use it in GitHub Desktop.
vote = [1,1,2,2,2,2,2,3]
def winner(vote,k):
a=0
for i in vote:
if i==k:
a+=1
if a>(len(vote)/2):
return True
else:
return False
print(winner(vote,2))
@Andygmb
Copy link

Andygmb commented Feb 22, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment