Hi I am new to python I want to find the cummulative average of the given list using accumulate() and lambda function i have written code till accumulate() but I can't find the cummulative average using lambda function. Can anyone help me with it ?
enter code here
a= [8,1,4,2,6]
import itertools as it
l=[]
l = it.accumulate(a)
print(list(l))
My output should be like this [4.5,4.33,3.75,4.2]