title: Insert hex value in the middle of a string python
body: <p>I want to create 5 hex bytes length  string that is gonna be send through a socket. I want that send 255 packets changing the third byte incremntally. How can I do that?
  Something like this code: </p>
  
  <pre><code>i=0    
  while True:
          a="\x3f\x4f"+hex(i)+"\x0D\x0A"
          socket.send(a)
          i=i+1
  </code></pre>
  
  <p>The problem is that this code is introducing 0x0 (30 78 30) instead of 00 in the first loop for example.</p>
  
  <p>Thank you</p>