Python Math Library Average