Finding the average of a list

On Python 3.4+ you can use statistics.mean() On older versions of Python you can do On Python 2 you need to convert len to a float to get float division There is no need to use reduce. It is much slower and was removed in Python 3.