Am Dienstag, 25. März 2008 23:02:00 schrieb Dark Wind: > In most of the languages ^ is used for 'to the power of'. In python we have > ** for that. But what does ^ do?
^ is the binary exclusive-or (xor) operator. Possibly it helps to see the following (numbers are in binary) to get the drift: 00 ^ 01 = 01 01 ^ 01 = 00 10 ^ 01 = 11 11 ^ 01 = 10 -- Heiko Wundram -- http://mail.python.org/mailman/listinfo/python-list