how to calculate moving average in python 3?,"print(sum(map(int, x[num - n:num])))"