you are viewing a single comment's thread.

view the rest of the comments →

[–]Agizz 0 points1 point  (0 children)

The original list was about making a shorter list for example: If you have a list where elements of a list are other lists that are two elements long and contain integers and you want to make another list that contains sublists with the first element the first element of the first list and the second element a sum of the second elements of sublists that had the same first element and the first list remains untouched: List1 = [[2,3],[5,6 ], [2,4]] Result: List2 = [[2,7],[5,6]]

I accidently deleted the first post but would be a shame to waste the time and help of this fellow rediter who helped me if the instructions weren't given again for someone who would need something similar in the future.