title: Set fixed length integer in python
body: <p>After a bit of googling, nothing came up. I am manipulating sequence numbers for network packets and need the numbers to be of a fixed length. For example:</p>
  
  <pre><code>&gt;&gt;&gt; 0000 + 1
  1
  </code></pre>
  
  <p>Instead, I'd like the integer that is returned to be 0001. Are there any built-in commands for setting an integer of fixed length?</p>
  
  <p>Edit: I do not need to print these integers, I need to actually manipulate them. I will need them to iterate but they must be fixed length so that they can be easily found in a networking protocol <code>head</code> file.</p>