hexadecimal calculations

François Pinard pinard at iro.umontreal.ca
Sat Apr 19 14:44:33 CEST 2003


[Andros]

> how to make these hexadecimal calculations in python?
> A0 XOR 79 = D9
> D9 - A8   = 31

hex(0xa0 ^ 0x79)
hex(0xd9 - 0xa8)

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard





More information about the Python-list mailing list