Python问题:SyntaxError: Non-ASCII character '\xe3' in file

details as follows:


Resolve as follows:

  1. SyntaxError: Non-ASCII character '\ xe3' in file means that the presence of non-ASCII characters in the file;

  2. ASCII is a character that is eight, a total of 256 characters, with the development of computers now use two or four characters;

  3. Additional recommendations in the file header :( effective pro-test)

  4. 1
    2
    3
    # -*- coding: cp936 -*-
    或者
    # -*- coding: utf-8 -*
  5. To form a more complex encoding and decoding.


Released nine original articles · won praise 27 · views 90000 +

Guess you like

Origin blog.csdn.net/szw_yx/article/details/79042641