运行Python时中文注释报错的解决办法

比如csdn.py,输入中文注释,运行时报错。

在开头加上:

#!/usr/bin/python
# -*- coding:utf8 -*- 

再运行就不报错了。

猜你喜欢

转载自blog.csdn.net/quantum7/article/details/83113409
今日推荐