python 2解决编码问题

import sys
reload(sys)
sys.setdefaultencoding('utf-8')

另:python 3的open函数能够直接加encoding参数python

相关文章
相关标签/搜索