genres = ["classic", "pop", "classic", "pop"]
plays = [500, 600, 150, 800]

total = {}

for i in range(len(genres)):
    genre = genres[i]
    play = plays[i]
    
    if genre in total:
        total[genre] += play
    else:
        total[genre] = play

best_genre = max(total, key=total.get)

result = [best_genre, total[best_genre]]
print(result)

Embed on website

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