title: How to append to bytes in python 3
body: <p>I have some <code>bytes</code>.</p>
  
  <pre><code>b'\x01\x02\x03'
  </code></pre>
  
  <p>And an <code>int</code> in range 0..255.</p>
  
  <pre><code>5
  </code></pre>
  
  <p>Now I want to append the <code>int</code> to the <code>bytes</code> like this:</p>
  
  <pre><code>b'\x01\x02\x03\x05'
  </code></pre>
  
  <p>How to do it? There is no <code>append</code> method in <code>bytes</code>. I don't even know how to make the integer become a single byte.</p>
  
  <pre><code>&gt;&gt;&gt; bytes(5)
  b'\x00\x00\x00\x00\x00'
  </code></pre>