I am working with python sockets and although I have read everything I can find on stackoverflow, regarding the socket.recv byte stream, I still have a few questions I hope some of you can answer.

So I have this line:

```
chunk = s.recv(1024)

```

I receive the following packet: `'\x12\x03\x10\x00\x00\x00\x00\x23\x45\x34\x56'`

I need to get bytes at index `1` & `2` ('\x03\x10') and convert the 2-byte data to an integer .. which should be 784.

What is the best way to handle this?

In addition, what is the best way to remove a portion of the chunk data and pass it into a function? I.E. I need to remove bytes at index 7 - 9 and pass that string of 3 bytes into a function.