>>"; 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?
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
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
## 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 3.2 Edit the .py file (1) Right-click: (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 ( 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() at the end and it will appear as: 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!