Home > Backend Development > Python Tutorial > What are the two ways to run a python program?

What are the two ways to run a python program?

angryTom
Release: 2020-02-25 13:43:01
Original
28350 people have browsed it

What are the two ways to run a python program?

What are the two ways to run a python program

The first way: REPL

The so-called REPL refers to read, eva, print, loop (read, calculate, print, loop). There are two ways to implement REPL operation:

1, IDLE (Integrated Development Environment Or integrated development and learning environment) is an integrated development environment for Python

What are the two ways to run a python program?

## Recommended:

Programming Learning Course

2. Windows Command Prompt

What are the two ways to run a python program?

Second method: Run the script

The advantage of the REPL method is that it is simple and clear, but it has many shortcomings when facing many large-scale projects. We can solve this problem by running a script

Open IDLE, click New File, create a new project, and enter the code you want to run here

What are the two ways to run a python program?

Note that there are no three consecutive greater than signs here. After writing the script, save it, record the saved path, and name it hello.py


When running the script, open the Windows command prompt and enter python file path (or py file path or direct file path)


What are the two ways to run a python program?

Press Enter to get the running result.

Note: You can also use other text editors to write python code, such as sublime text3, vscode (

vscode tutorial), the operation method is the same.

Many

python training videos, all on the python learning network, welcome to learn online!

The above is the detailed content of What are the two ways to run a python program?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template