title: How to convert a string of 10 digits to 5 bytes containing the input string as hex values in Python
body: <p>my_string = &quot;0123456789&quot;.</p>
  <p>I want to convert this string to 5 bytes containing the input string as hex values(each byte representing two digits). Wanted output may be something like</p>
  <pre><code>byte1 = 0x01
  byte2 = 0x23
  byte3 = 0x45
  byte4 = 0x67
  byte5 = 0x89
  </code></pre>
  <p>All the smart people, please share your opinion or a sample code.</p>