Python Error : File

Python Error : File

>>> python ex1.py

You are trying to run your script from within a python interpreter. You dont 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

Exit python interpreter by typing exit() or press Crtl+Z

You will see the terminal now.

Type python file_name.py to run the code.

Happy coding!!!

Python Error : File

Try type

exit()

return; then

python ex1.py

return

Leave a Reply

Your email address will not be published. Required fields are marked *