0

I wonder how I can convert an unsigned integer 64bit to the hexadecimal?

I have the value as '65536L' and what I am expected is '0x0000000000010000'.

Many Thanks

Royeh
  • 161
  • 1
  • 11

1 Answers1

3

Use Stringformating:

"{:#016x}".format(65536)
Daniel
  • 42,087
  • 4
  • 55
  • 81