0

I made a new file in IDLE named intro.py insdie it i typed print('Hello World') and saved it in Desktop, then i open python in the terminal and type in python Desktop/intro.py this happens:

File "<stdin>", line 1 python Desktop/intro.py
SyntaxError: invalid syntax

Why doesnt Hello World show up?

OmarX
  • 1
  • 1
    Looks like you file contains something you are not expecting. What would the output of the `cat Desktop/intro.py` be? – saferif Sep 20 '21 at 09:29
  • 1
    Does this answer your question? [syntax error when using command line in python](https://stackoverflow.com/questions/13961140/syntax-error-when-using-command-line-in-python) – Goh Kok Han Sep 20 '21 at 09:30
  • https://stackoverflow.com/help/minimal-reproducible-example – Terry Jan Reedy Sep 20 '21 at 21:20

0 Answers0