title: python, from json object (hex) to raw internal binary string
body: <p>in python how can i convert a "json-loaded" object value into raw binary string? ie "0A" to be converted to "1010"?</p>
  
  <p>what i do is the following:
  read a line from a file, ie assume the file contains this line:</p>
  
  <pre><code>{"hex":"0A01145af1ab"}
  </code></pre>
  
  <p>i read it with 
  then i load it with json library //ok so far</p>
  
  <pre><code>data = json.loads(a_line)
  </code></pre>
  
  <p>then i can use data["hex"],</p>
  
  <p>but i need ie. "0A" to be converted to "1010", and i don't know how to do that
  i read this <a href="https://stackoverflow.com/questions/8445447/in-python-how-to-convert-a-hex-ascii-string-to-raw-internal-binary-string">topic</a> which is similar to my problem, but it didn't help me (base64.b16decode(data["hex"]) returns error) </p>
  
  <p>thanks a lot!</p>