[Python-ideas] AVG Function as Built-in

2019-12-26 Thread Stephen J. Turnbull
Kemal Diri writes: > In my opinion, if I can get sum of the list, I should get avg also > in a same way. And later: > The reason to propose this evolution is basically, > * If I can do sum(list) and len(list), would be better to do > avg(list) (since I know sum and len of my list),

[Python-ideas] AVG Function as Built-in

2019-12-26 Thread Kemal Diri
Hello, I think it would be nice to introduce an avg method for lists as a built-in function in python3. To get average of the list, I need to use some libs (eg numpy). In my opinion, if I can get sum of the list, I should get avg also in a same way. For ex [python3]: >>> l = [5, 9, 7,] ... ...