def pack4(v):
 assert (0 <= v <= 4294967295)
 return struct.pack('<I', v)

def pack4 ( v ) : assert ( 0 <= v <= 4294967295 ) return struct . pack ( '<I' , v )
takes a 32 bit integer and returns a 4 byte string representing the number in little endian .