title: Hex data from socket, process and response
body: <p>Lets put it in parts.</p>
  
  <p>I got a socket receiving data OK and I got it in the <code>\x31\x31\x31</code> format.</p>
  
  <p>I know that I can get the same number, ripping the <code>\x</code> with something like </p>
  
  <pre><code>for i in data: print hex(ord(i))
  </code></pre>
  
  <p>so I got <code>31</code> in each case.</p>
  
  <p>But if I want to add 1 to the data (so it shall be "<code>32 32 32</code>")to send it as response, how can I get it in <code>\x32\x32\x32</code> again?</p>