From: angus@... Date: 2002-08-08T18:50:06+09:00 Subject: Re: Fun with shifting bytes / Python translation [...] > I don't understand how lamba or reduce work, for instance. [...] > L=map(lambda x: ord(x), L[0:4]) > L.reverse() > n=reduce(lambda x,y: x*256+y, L, 0L) I don't know about the math, but with regard to the lambdas, I suppose the first creates an array containing the byte values of the string: l = l.split(//).map{ |c| c[0] } l.reverse! and the second could be something like this: n = 0 l.each {|i| n = n*256+i } But I really don't know Python. Good luck.