可以这样: # st = r'\xe6\xb9\x96\xe5\xb7\x9e\xe6\x96\xb0\xe5\x9f' bytes([int(i, 16) if i else None for i in st.split(r'\x')][1:]).decode('utf-8', errors='ignore') 或者: # st = r'\xe6\xb9\x96\xe5\xb7\x9e\xe6\x96\xb0\xe5\x9f' eval("b'"+(st)+"'").decode('utf-8', errors='ignore')