"Hendrik van Rooyen" <[EMAIL PROTECTED]> writes:
> > s += chr(reduce(operator.xor, ar))
> Yikes! - someday soon I am going to read the docs on what reduce does...

Reduce just intersperses an operator over a sequence.  For example,
  reduce(operator.add, (a,b,c,d,e)) 
is a+b+c+d+e.  

> Won't this be slow because of the double function call on each char?

I think there's the same number of func calls, one xor per char.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to