Home>Article>Backend Development> How to run the python code after writing it

How to run the python code after writing it

PHPz
PHPz Original
2020-09-25 16:05:25 57546browse

The python code has been written to run: first enter cmd in the file address bar and hit Enter; then enter [python hello.py] in the corresponding directory to run the program.

How to run the python code after writing it

Related learning recommendations:python tutorial

The python code has written the running method:

1. As shown in the figure below, there is a hello.py file

How to run the python code after writing it

2. We directly enter cmd in the file address bar above and hit Enter

How to run the python code after writing it

3. As you can see, we can directly navigate to the corresponding directory.

How to run the python code after writing it

4. We enter python hello.py to run the program

How to run the python code after writing it

5. Of course, you can also run it directly hello.py

How to run the python code after writing it

The above is the detailed content of How to run the python code after writing it. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn