Python Error : File “

>>> python ex1.py

You are trying to run your script from within a python interpreter. You don’t want to do that.

Instead, just run that command in a terminal, not in the interpreter

$ python ex1.py

If you are still in the interpreter, you can press ctrl+d to leave it and return to the ‘normal’ terminal

Leave a Comment