When there is only one python version on the computer, enter python directly. Three small arrows will appear on the last line, and the python program will be written behind them. Press Enter to get the answer.
After the three small arrows, enter exit() to exit the python program.
This form of interactive command line can only write and run one line.
You can directly build a py file to run.
Create a new text document and change the suffix to .py.
Then enter in cmd: Python + space + the path to the python file.
Or first use the cd command to reach the directory where the python file is located, and then enter the Python space filename.py.
Run Python with cmd
Guess you like
Origin blog.csdn.net/qq_45884783/article/details/107059381
Recommended
Ranking