I was examining a code written in python but I got confused with the following line.
return ( reduce(lambda x, y: x + y,myList, 0)/len(Actions), )
The part that corresponds well to a list comprehension is what the reducing function does with its second argument
tmp = [ y for y in myList ]
The reducing function then combines this list one element at a time with the "accumulator"
x = 0 # The third argument to reduce tmp = [ y for y in myList ] for y in tmp: x += y
or more simply
x = 0 for y in myList: x += y
or, as you have probably recognized by now
sum(y for y in myList)