SyntaxFix
Write A Post
Hire A Developer
Questions
This is fast and works for small and (arbitrary) large ints:
def Dump(n): s = '%x' % n if len(s) & 1: s = '0' + s return s.decode('hex') print repr(Dump(1245427)) #: '\x13\x00\xf3'