1 | initial version |
Python (and hence sage) understand exactly the hexadecimal notation that you use here, so this just works:
sage: y = 0x0d * 0x0c
sage: y
156
As you can see, sage will normally print the integer in decimal, even if you have obtained it from integers inputted in hex (the way the integer is obtained is not part of what is remembered. Only its value is). If you want to print it in hex you can do:
sage: y.str(16)
'9c'