fork download
  1. f=lambda x:reduce(lambda x,y:y/float(x),x[1:-1][::-1])
  2.  
  3. for i in [[1,1,2,2],[1,2,1,2,1,2],[6,12,3,10,5,8]]:
  4. print(f(i))
Success #stdin #stdout 0.01s 8968KB
stdin
Standard input is empty
stdout
0.5
4.0
8.0