2008/3/25, Dark Wind <[EMAIL PROTECTED]>:
> Hi,
>
> In most of the languages ^ is used for 'to the power of'. In python we have
> ** for that. But what does ^ do?

It is bitwise xor. Some more information can be found at
http://docs.python.org/ref/bitwise.html

> I could not get it just by using it ... some examples are:
> 1^1 returns 0
> 2^2 returns 0
>  1^4 returns 5
> 4^1 returns 5
> 3^5 returns 6
> 5^3 returns 6 ......
>
> just curious
>
> Thank you
>
> --
>  http://mail.python.org/mailman/listinfo/python-list
>


-- 
-- Guilherme H. Polo Goncalves
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to