Python nested List based Weighted Average Calculation