Python 中文注释报错

原因

如果文件里有非ASCII字符,需要在第一行或第二行指定编码声明。

解决方法

在第一行中加入
# -- coding: utf-8 --

猜你喜欢

转载自blog.csdn.net/qq_36383239/article/details/82703239