title: How can I read a byte array from a socket in Python
body: <p>I am using bluetooth to send a 16-byte byte-array to a Python server. Basically what I would like to achieve is read the byte-array as it is. How can I do that in Python.</p>
  
  <p>What I am doing right now is reading a string since that is the only way I know how I can read data from a socket. This is my code from the socket in python</p>
  
  <pre><code>data = client_sock.recv(1024)
  </code></pre>
  
  <p>Where <code>data</code> is the string. Any ideas?</p>