I have to find the average of a list in Python. This is my code so far
l = [15, 18, 2, 36, 12, 78, 5, 6, 9] print reduce(lambda x, y: x + y, l)
I tried using the options above but didn't work. Try this:
from statistics import mean n = [11, 13, 15, 17, 19] print(n) print(mean(n))
worked on python 3.5