I am required to transmit a BYTE array containing hexadecimal values of size no more than 250 bytes in the following format:
header|no of data structures|Data/Payload
Now, I have read multiple posts on stackoverflow regarding memory allocation to a an array but i didn't reach any viable solution. I am required to restrict the data to 250 bytes as i am going to be sending this data to a device that reads only 250 bytes.
Currently the size of my array according to python is 416 bytes.

list,array(fromuse array), a numpy array, or abytearray?struct.pack()?