I have to get bytes array and send it into socket.
The structure looks like: 1 byte + 2 bytes + 2 bytes.
First byte is number '5', second 2 bytes should be taken from variable first, third 2 bytes should be taken from variable second. What's the right way to do this in python?
id = 5 # Fill as 1 byte
first = 42 # Fill as 2 bytes
second = 58 # The same as first