I am novice in Python, so maybe I can't express it well...
I got a string '\xb9\xfe'
I want it print in this very fashion '\xb9\xfe'
, not converting to a Chinese character '哈'
.
What is the proper way to do it?
Use a raw string literal instead:
r'\xb9\xfe'
or print the output of repr()
of your string:
print(repr('\xb9\xfe'))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With