>>"; then press the Enter key to run."/> >>"; then press the Enter key to run.">

Home  >  Article  >  Backend Development  >  How to run python3

How to run python3

藏色散人
藏色散人Original
2019-10-24 09:42:577422browse

How to run python3

How to run python3?

The first is to open and run Python. There are three running methods under the Windows system:

1. Use the DOS command line window 2. Use the IDLE that comes with Python 3. Use Script run.py

1. Use the DOS command line window

First search for Python in the search box, get the picture below, and open it;

In >>>Enter print("hello world") and press the Enter key to get the following picture //Note that the syntax is different from Python2

How to run python3

2. Use IDLE that comes with Python

First search for IDLE in the search box, get the picture below, and open it;

Enter print("hello world") after >>> Then press the Enter key to get the following picture

How to run python3

## 3. Use the script to run.py ★★★★★

The This method is used in 99.9% of cases. Using independent scripts to run has the advantages of repeatability and modifiability.

Four major editors: Sublime, Atom, VS Code and Notepad

3.1 Create a new .py file

(1) Open your text editor (Notepad can also be used) ), save it as a *.py file

(2) Also use the IDLE-file-new File opened by the previous method to create a new .py file

How to run python3

3.2 Edit the .py file

(1) Right-click:

How to run python3

(2) Or open it for editing directly with txt and enter print("hello world")

3.3 Run the script file

(1) Just press F5 to run in the editing state

How to run python3

( 2) Run it in non-editing mode. Just double-click it; when you find that the results of the mini program flash by, add input()

How to run python3

at the end and it will appear as:

How to run python3

Note: If it cannot run, the system PATH variable may not be configured.

The above is the detailed content of How to run python3. 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
Previous article:How to pronounce pythonNext article:How to pronounce python