title: lstrip for hexadecimal numbers, how to?
body: <p>I have been using Python to convert a number into its hexadecimal format and getting rid of the <code>'Ox'</code> prefix of each number by using <code>str.lstrip</code>; something like:</p>
  
  <pre><code>&gt;&gt;&gt; data='0'
  &gt;&gt;&gt; data
  '0'
  &gt;&gt;&gt; data=str(hex(int(data)))
  &gt;&gt;&gt; data
  '0x0'
  &gt;&gt;&gt; data=data.lstrip("0x")
  &gt;&gt;&gt; data
  ''
  </code></pre>
  
  <p>The problem that I got here is that instead of printing <code>'0'</code>, it prints <code>''</code> after applying the <code>lstrip</code> method. My question is how can I do it so it prints <code>'0'</code>, instead of the empty string <code>''</code>? I need it in <code>str</code> type because I will store that data in a file.</p>