解决python代码问题SyntaxError: Non-UTF-8 code starting with '\xb8'

程序中出现中文,运行的时候出现如下错误

导致的根源就是编码问题

解决方案:

在程序的首行加上:

猜你喜欢

转载自blog.csdn.net/weixin_40205234/article/details/86487798