f=lambda x:reduce(lambda x,y:y/float(x),x[1:-1][::-1]) for i in [[1,1,2,2],[1,2,1,2,1,2],[6,12,3,10,5,8]]: print(f(i))
Standard input is empty
0.5 4.0 8.0
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!