原文:\xe7\x99\xbe\xe5\xba\xa6\xe6\x90\x9c\xe7\xb4\xa2这种字符如何转成中文呢?

加上decode 就可以。 举个例子: from urllib import request response request.urlopen http: www.baidu.com print response.read .decode 不加就成了 xe x xbe xe xba xa xe x x c xe xb xa 这样的字符 ...

2018-04-20 11:00 0 3925 推荐指数:

查看详情

 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM