[pyar] Hat symbol: qué hace?
Matías Herranz
matiasherranz en gmail.com
Jue Mayo 24 08:15:41 ART 2012
Hola!
Hoy, porque sí, tipeé esto en la consola python:
>>> 12^23
>
Y dio 27.
Lo cual me llevó inmediatamente a la pregunta: ¿Qué hace el hat-symbol en
Python?
Después de buscar un ratito, encontré que era un bitwise exclusive or (ref:
http://docs.python.org/library/operator.html ).
Curiosidad (al menos para mi!) del día!
Abrazo!
M.-
--
Matías Herranz <matiasherranz en gmail.com>
Twitter: @matiasherranz
CV en LinkedIn: http://www.linkedin.com/in/matiasherranz
"I think computer viruses should count as life. I think it says something
about human nature that the only form of life we have created so far is
purely destructive. We've created life in our own image" Stephen Hawking.
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://listas.python.org.ar/pipermail/pyar/attachments/20120524/97e7dff4/attachment.html>
More information about the pyar
mailing list