首页
IT
登录
6mi
u
盘
搜
搜 索
IT
Python list 输出中文
Python list 输出中文
xiaoxiao
2021-04-13
32
虽然Python经过# -*- coding: utf-8 -*- 设置后能正常输出中文,但当输出list时,还是输出unicode码。
解决方法:
1. 安装库 pip install uniout ,然后文件开头加import uniout 即可正常显示。
2. 使用如图的输出方式 str(a).decode('string_escape')
转载请注明原文地址: https://ju.6miu.com/read-668870.html
技术
最新回复
(
0
)