I am trying out the Counter method in python and then convert to dictionary. However, the list of elements is very large (~4200 elements). So the function is supposed to print the element and its frequency but it gives an error saying: ValueError: too many values to unpack (expected 2)
from collections import Counter
def contribution(competition):
users = Counter(['Filipe Andrew', 'M. B, Jnr, 'Retro P', 'Filipe Andrew', ...]) #up to 4200 elements
users_dict = dict(users)
for user, num_contribution in users_dict:
print(user, ' -> ', num_contribution)
contribution('year 2015_in_Brazil')```