I used this here to sum the second value of each tuple in a list: https://stackoverflow.com/a/12218119/9195816
sum(n for _, n in structure)
works fine. But i dont need the sum, i only need the average. So something like sum(n for _, n in structure) \ total_amount_of_values
. But of course, this won't work:
TypeError: unsupported operand type(s) for /: 'float' and 'list'
My list looks i.e. like this: [1000, 900.84, 500, 1240.11]