会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
myrj
博客园
首页
新随笔
联系
订阅
管理
2022年5月26日
Python去掉Unicode编码中的‘\u‘开头
摘要: Unicode编码的字符串,print()显示为'\u....'开头,在Python中无法通过直接删除'\u'来获取后边的字符串,通过如下方法可以 '\ue567'.encode('raw_unicode_escape').decode('utf-8').replace('\\u', '')得到'e
阅读全文
posted @ 2022-05-26 20:11 myrj
阅读(0)
评论(0)
推荐(0)
公告