21
Python 3 中如何解决字典对字符串进行转义
source link: https://www.v2ex.com/t/639618
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Python - @euzen - str = '源代码'bytes = str.encode('utf-8')str2 = bytes.decode('iso-8859-1')dict = {'key': str2}p
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK