For list of dicts: merge same key values, sum another diff. values, count each merge iteration +1 Python

If anybody can help me with some task? I have list of dicts(or tuples), where: if tuples:

or can be converted to dict like:

comment_id – is always unique and cannot meet twice in this list, user_id – is not unique for this list, it can be there as much times as comments were left in the set of posts (naturally I wanted to use this as counter) comment_date and comment_time – can be ignored, needed to sel from db, comment_likes – how much likes each comment has. The task – make one list of tuples or dictionaries where I have just one ‘user_id’ unique, next how much ‘likes’ each item has (sum) and how much times thisShort Read more…