I have got the hang of sorting a list of tuples by their second elements when that element is just a solo integer, but something about the second elements being lists of integers is throwing me. for example with the following list...
[("Jack", [1,2,5,3]), ("Anna", [7,8,5,2]), ("Ryan", [1,2,1,1])]
... I am trying to sort the list of tuples into ascending order based on the sums of the lists within each (so as to produce the following outcome in this example)...
[("Ryan", [1,2,1,1]), ("Jack", [1,2,5,3]), ("Anna", [7,8,5,2])]
Thanks
edit: My question differs from Sort a list of tuples by 2nd item (integer value) because mine refers specifically to the case in which the second element is a list, which is where my stumbling block was. Thanks for helpful replies so far.