介是内容:
Python 3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021, 20:19:38) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
print('hello')
介是idle run module的结果:
介是拖入cmd的结果:
C:\Users\中>D:\SystemF\桌面\1.py
File "D:\SystemF\桌面\1.py", line 1
Python 3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021, 20:19:38) [MSC v.1929 64 bit (AMD64)] on win32
^
SyntaxError: invalid syntax
报错是缩进或者语法错误,你重新打下代码试试
你的hello两边的单引号检查下是不是英文符号
排除字体的问题,我怀疑你这个单引号是中文单引号,建议确认一下单引号和括号是否为中文标点
有帮助望采纳
语句中的括号和引号均要使用英文半角标点符号。改一下试试
print('hello')
语法错误哦
hello的 o后边缺少单引号’
......实测发现只要把print前面的都删掉就行了......
所以说为什么要在前面标一大堆备注啊~