Python is a cross-platform, open source, free interpreted high- level dynamic programming language. It supports pseudo-compilation to convert source code into bytecode to optimize programs to improve running speed and keep source code confidential, and supports the use of py2exe, pyinstaller, cx_Freeze Or other similar tools package the Python program and all its dependent libraries into an executable program with the extension exe, so that it can run independently on the Windows platform; Python supports imperative programming, functional programming, and fully supports object-oriented programming. Has a large number of mature extension libraries that support application development in almost all fields.
If you want to write Python programs on your Android phone, you can install QPython3 that supports Python3.x or QP ython that supports Python2.x
First, the use of IDLE
IDLE is the official standard development interactive environment for Python. The interactive mode is generally used to implement some simple business logic or verify some functions. More complex business logic is realized by writing Python programs. IDLE is installed by default when Python is installed. Commonly used shortcut keys in IDLE :
hot key | Function Description |
Ctrl+Z | revoke |
Ctrl+A | select all |
Ctrl+C | copy |
Ctrl+V | paste |
Ctrl+X | cut |
Tab | Complete words, list all optional words for selection |
Alt + P | Browsing history commands (previous) |
Alt + N | Browsing history commands (next) |
Alt+3 | comment block |
Alt+4 | Uncomment a code block |
Alt+/ | Auto-complete words that have appeared before, and cycle through multiple words if there are multiple monads with the same prefix before |
Ctrl+F6 | Restart the shell, the previously imported modules and defined objects are all invalid |
Ctrl+] | Indent code blocks |
Ctrl+[ | unindent code block |
F1 | Open Python Help Documentation |
IDLE does not have a shortcut key for clearing the screen. It can be extended through ClearWindow.py. The download link is as follows:
Baidu network disk sharing link: https://pan.baidu.com/s/1zzrMlPI8JSa7SWgTCWnBuA , password: 62mr
Store the ClearWindow.py file in the Lib\idlelib folder in the Python installation path, then open the file Lib\idlelib\config-extensions.def in Notepad, and add a few lines of configuration at the end:
[ClearWindow]
enable=1
enable_editor=0
enable_shell=1
[ClearWindow_cfgBindings]
clear-window=<Control-Key-;>
Restart IDLE, and the clear screen option will appear in the corresponding menu to clear the screen.
2. Variables, Operators and Expressions