DEV Community

Mauro
Mauro

Posted on

Answer: Python Error : File "<stdin>"

>>> 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…

Top comments (0)