When learning Python, the first program hello.py (below)
Print ("Hello Welcome to Python World")
Run the report error because the command line indicates that the Python interpreter has been run, note the command-line environment and the Python interactive environment, such as direct input python
into interactive mode, that appears >>> is entering the python interactive environment , Equivalent to launching the Python interpreter, waiting for you to enter the source code line by line, each line of input to execute a line. Now that you've written the. py file, you want to execute the full-part source code at once, you should run the file directly instead .py
of entering the source code interactively.
Because I entered the Pyhon command before executing the Python hello.py, the correct approach would be to execute Python directly hello.py
Python {File ' <stdin> ', line 1} error