votes = ["james", "mary", "james", "mary", "john"]

vote_count = {}

for name in votes:
    if name in vote_count:
        vote_count[name] += 1
    else:
        vote_count[name] = 1

winner = ""
max_vote = 0

for name in sorted(vote_count):
    if vote_count[name] > max_vote:
        max_vote = vote_count[name]
        winner = name

print(winner)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: