首页 > 解决方案 > 如何执行python文件?

问题描述

我做了test.py并跑了chmod u+x test.py。如果我运行python test.py但不运行,它会起作用./test.py。我究竟做错了什么?

./test.py: line 1: syntax error near unexpected token `"HelloWorld"'
./test.py: line 1: `print ("HelloWorld")'

标签: python

解决方案


推荐阅读