程序1:name=“
(name)
出现错误:
C:\Python36\python.exe C:/Users/XX/PycharmProjects/S23/DAY1/VAR.py
File "C:/Users/XX/PycharmProjects/S23/DAY1/VAR.py", line 2
name=:“你好,世界”
^
SyntaxError: invalid character in identifier
原因:“”应切换到英文输入法""
修改:
name="你好,世界"
print(name)
程序2:
name = name2 = namename = (,name,name2)
python2 中:# -*- coding:utf-8 -*- 是指告诉python解释器不用ASCII码解释程序,用utf-8解释程序