How to generate program files for python idle: First click to run IDLE and press [Ctrl N] to create a new file; then default to untitled and save it; then write the regular Python code; finally press the F5 key to run it. Can.
【Related learning recommendations: python tutorial】
How to generate program files from python idle:
1. First, search for IDLE in the win10 search box, and then click to run IDLE.
#2. As shown in the picture, it is in test mode when it is first opened. This mode is relatively friendly and can be tested at will.
#3. If you want to edit a more formal python file, you need to create a new one. "Ctrl N" is the new idle file.
#4. After that, an additional window will appear. This window is different from the window that is opened for the first time. This window can edit python code.
The default is untitled, so you need Ctrl S to save it. The default is Python File type when saving.
5. After saving, write the regular Python code. Here I directly use print to test.
#6. Then it is run. It is effective to run it as a module. The shortcut key is F5.
#7. Then you will see the running result of the file in the previous Shell window, as well as the file path prompt.
The above is the detailed content of How to generate program files in python idle. For more information, please follow other related articles on the PHP Chinese website!