title: Length of binary data in python
body: <p>I am using Python. I am trying to determine the correct length of bytes in a binary set of data. </p>
  
  <p>If I assign a variable the binary data...</p>
  
  <pre><code>x = "aabb".decode("hex")
  </code></pre>
  
  <p>is that the same as </p>
  
  <pre><code>x = b'aabb'
  </code></pre>
  
  <p>And if so, how do you get how many bytes that is? (It should be 2 bytes) </p>
  
  <p>When I try:</p>
  
  <pre><code>len(x)
  </code></pre>
  
  <p>I get 4 instead of 2 though... </p>
  
  <p>I am worried that x is turned into a string or something else I don't understand because the data types are so fluid in Python...</p>