在学习Python中遇到问题点及解决记录

中文编码错误

在Python 2.7.5版本中遇见。
图片1
解决方法为只要在文件开头加入

1
# -*- coding: UTF-8 -*-

或者
1
#coding=utf-8