标签:pytho encode pre 字符串 int lin read decode 文件
#文件内容 lisi
lock = open("lock_info.txt", "r+",encoding="utf-8")
lock_line = lock.readline()
lock_list = lock_line.split(",")
print(lock_list)
y = lock_line.encode(‘utf-8‘).decode(‘utf-8-sig‘)
print(y)
#打印结果如下
[‘\ufefflisi‘]
lisi
python 字符串转列表 list 出现\ufeff解决方法!
标签:pytho encode pre 字符串 int lin read decode 文件
原文地址:http://www.cnblogs.com/ByronHe/p/7062150.html