title: python - writing hex digits to csv
body: <p>I am having a the following string:</p>
  
  <pre><code>&gt;&gt;&gt; line = '\x00\t\x007\x00\t\x00C\x00a\x00r\x00d\x00i\x00o\x00 \x00M\x00e\x00t\x00a\x00b\x00o\x00l\x00i\x00c\x00 \x00C\x00a\x00r\x00e\x00\t\x00\t\x00\t\x00\t\x00 \x001\x002\x00,\x007\x008\x008\x00,\x005\x002\x008\x00.\x000\x004\x00\r\x00\n'
  </code></pre>
  
  <p>When I type the variable <code>line</code> in the python terminal it showing the following:</p>
  
  <pre><code>&gt;&gt;&gt; line
  '\x00\t\x007\x00\t\x00C\x00a\x00r\x00d\x00i\x00o\x00 \x00M\x00e\x00t\x00a\x00b\x00o\x00l\x00i\x00c\x00 \x00C\x00a\x00r\x00e\x00\t\x00\t\x00\t\x00\t\x00 \x001\x002\x00,\x007\x008\x008\x00,\x005\x002\x008\x00.\x000\x004\x00\r\x00\n'
  </code></pre>
  
  <p>When I am printing it, its showing the following:</p>
  
  <pre><code>&gt;&gt;&gt; print line
          7    Cardio Metabolic Care               12,788,528.04
  </code></pre>
  
  <p>In the variable <code>line</code> each word is separated using <code>\t</code> and I wanted to save it to a csv file. So I tried using the following code:</p>
  
  <pre><code>import csv
  with open('test.csv', 'wb') as csvfile:
      spamwriter = csv.writer(csvfile, delimiter=',')
      spamwriter.writerow(line.split('\t'))
  </code></pre>
  
  <p>When I look into the <code>test.csv</code> file, I am getting only the following</p>
  
  <pre><code>,,,,,,
  </code></pre>
  
  <p>Is there any to get the words into the csv file. Kindly help.</p>