title: python convert list to hex data
body: <p>My data like this:</p>
  
  <pre><code>a = ['aa', '55', '00', '01', '00', '0a']
  </code></pre>
  
  <p>And I want to convert it to:</p>
  
  <pre><code>a = '\xaa\x55\x00\x01\x00\x0a'
  </code></pre>
  
  <p>How should I do </p>
  
  <p>Thanks</p>
  
  <hr>
  
  <p>code:</p>
  
  <pre><code>a = ['AA', '55', '00', '01', '00', '0A', '0F', 'A1', '13', '88', '00', '04', '32', '33', '30', '31', '30', '34', '00', '01']
  
  d = []
  for item in a:
      tmp = chr(int(item, 16))
      d.append(tmp)
      print(type(tmp))
  
  print(repr(''.join(d)))
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>ªU\x00\x01\x00\n\x0f¡\x13\x88\x00\x04230104\x00\x01
  </code></pre>
  
  <p>And the result as the same as </p>
  
  <pre><code>\xAA\x55\x00\x01\x00\x0A\x0F\xA1\x13\x88\x00\x04\x32\x33\x30\x31\x30\x34\x00\x01
  </code></pre>
  
  <p>I used <em>print</em> and <em>repr</em> to print it, Is there some way that can print it without auto convert. Thx</p>