擅长:python、mysql、java
<p>这似乎是最简单的方法。。。在</p>
<pre><code>ascstr = 'x\02S20..." #your string
#I think you need to get rid of the first 4 characters '\x02' looks like
#it is hex
ascstr = ascstr[4:]
for c in mystring:
hexstr = hexstr + hex(ord(c))[2:] + ' '
</code></pre>