How to convert \\xhh into \xhh python

Viewed 983

I have encounter a case where I need to convert a string of character into a character string in python.

s = "\\x80\\x78\\x07\\x00\\x75\\xb3"
print s #gives: \x80\x78\x07\x00\x75\xb3

what I want is that, given the string s, I can get the real character store in s. which in this case is "\x80, \x78, \x07, \x00, \x75, and \xb3"(something like this)�xu�.

3 Answers
Related