Given a list like:
[['james',100,200,300],['james',200,300,400], ['charles',200,200,100]]
I need to add the components of the two lists that have the same first index like so:
[['james',300,500,700],['charles',200,200,100]]
Thanks for the answers. Just found out I have to do so without importing any modules. Is there a way to do so? I've tried using for-loops but cannot find out what to index for.