what does ^ do in python

Dark Wind darkwind.87 at gmail.com
Tue Mar 25 18:02:00 EDT 2008


Hi,

In most of the languages ^ is used for 'to the power of'. In python we have
** for that. But what does ^ do?
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080325/60b3a295/attachment.html>


More information about the Python-list mailing list