I'm writing a plurality program in Python, letting voters vote for candidates and printing out the winner (most frequent name). I've managed to input the number of voters and their votes, but I can't seem to print out the winner. (It keeps printing out the least frequent.) And if you find any other errors, please correct them.
NB: This is a cs50 project. It was asked to be done in C, but I wanted to try it in Python.
from collections import Counter
#max = 9
candidates = ["Bob", "Steve", "Ross"]
for key in range(len(candidates)):
print(candidates[key], end = " ")
v = []
voters = int(input("\nNumber of voters: "))
for i in range(voters):
votes = input("Vote: ").capitalize()
v.append(votes)
print(v)
vote_count = Counter(v)
print(vote_count)
max_votes = max(vote_count.keys())
print(max_votes)