001、
[root@pc1 test1]# ls test01.py test02.py [root@pc1 test1]# cat test01.py #!/usr/bin/env python # 注释内容 list1 = ["aa", "bb", "cc"] print(list1) [root@pc1 test1]# cat test02.py #!/usr/bin/env python # -*- coding: utf-8 -*- # 注释内容 list1 = ["aa", "bb", "cc"] print(list1) [root@pc1 test1]# python test01.py File "test01.py", line 3 SyntaxError: Non-ASCII character '\xe6' in file test01.py on line 3, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details [root@pc1 test1]# python test02.py ['aa', 'bb', 'cc']
。
标签:test1,pc1,utf,python,py,coding,test01,root From: https://www.cnblogs.com/liujiaxin2018/p/18061455