0

Given a list of lists of form [string, int], say:

given_list = [
["adam", 1],["billy", 2],["adam", 3]
]

How would you add all integers coupled with each given string to return a list of lists consisting of the set of the strings coupled to the sum of all integers associated with that string?

desired_list = [
["adam", 4],["billy",2]
]
Jignasha Royala
  • 1,032
  • 10
  • 27

0 Answers0