Error

SyntaxError: Non-UTF-8 code starting with ‘\xe4‘ in file G:/PythonDemo/test.py on line 2


Solution

Add the correct encoding declaration at the beginning of your code file:

# -*- coding: utf-8 -*-