原文:\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