Python: Convert String to Byte Array
<p>Say that I have a 4 character string, and I want to convert this string into a byte array where each character in the string is translated into its hex equivalent. e.g.</p>

<blockquote>
  <p>str = "ABCD"</p>
</blockquote>

<p>I'm trying to get my output to be </p>

<blockquote>
  <p>array('B', [41, 42, 43, 44])</p>
</blockquote>

<p>Is there a straightforward way to accomplish this?  Thanks!</p>
