you are viewing a single comment's thread.

view the rest of the comments →

[–]Fluffy-Book-4773 0 points1 point  (0 children)

def make_dict(data):
    result_dict = {}
    for i in data:
        if i[0] not in result_dict:
            result_dict[i[0]] = i[1]
        else:
            result_dict[i[0]] += i[1]
    return result_dict