运行python程序时出现错误“SyntaxError: Non-ASCII character 'xe8' in file variable.py on line 1, but no encod”

在文件头部加上:

# -*- coding: utf-8 -*-
 
原文地址:https://www.cnblogs.com/curedfisher/p/12703995.html