In [9]: b='\xa3' ​

In [10]: b
Out[10]: '£' ​

In [11]: d='\u00a3'.encode('latin1') ​

In [12]: d
Out[12]: b'\xa3' ​
In [13]: d.decode('latin1')
Out[13]: '£'

'Python > string' 카테고리의 다른 글

binary, utf-8, utf-16  (0) 2019.12.27
append, pop, sort, reverse  (0) 2019.12.27
ascii, hex, unicode  (0) 2019.12.26
string format  (0) 2019.12.26
strip, rstrip, lstrip  (0) 2019.12.26

+ Recent posts