0

Is there a good cross-version (Python 2 and Python 3 compatible) way of converting arbitary sized long integers to arrays of bytes and back (both little and big endian)?

I only found one solution to convert byte array to int:

int(codecs.encode(dat, 'hex'), 16)
user2102508
  • 1,009
  • 11
  • 23

0 Answers0