python学习

1、中文问题

需要在文件头部加入以下代码,指定编码方式

# -*- coding: utf-8 -*- 

str = u'中文'

原文地址:https://www.cnblogs.com/xiaoerhei/p/3837814.html