I want to convert a 64 bit integer to a byte array of length 16.
For example, I want to convert 687198803487 to [31 150 61 0 160 0 0 0 0 0 0 0 0 0 0 0]
In Go, I'm able to do this using
id := make([]byte, 16)
binary.LittleEndian.PutUint64(id, uint64(687198803487))
How can I replicate this in Python 2?
ddeals with typedouble.struct.unpack('8B', struct.pack('>Q', x))[::-1]