I was very angry about the leading 0x until I have seen binascii and formatting.
In [22]: import binascii In [23]: binascii.hexlify(b'Hello World') Out[23]: b'48656c6c6f20576f726c64' In [24]: binascii.unhexlify(_) Out[24]: b'Hello World' In [25]: x = 42 In [26]: f'{x:x}' Out[26]: '2a' In [27]: f'{x:010x}' Out[27]: '000000002a'
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!