Sum the second value of each tuple in a list

sum(n for _, n in structure)

would work.

Leave a Comment