def func(seq): ... newlist = reduce(lambda x, y: (x+y)/y, seq) ...