WeChat public account: IT Bond
-
Enter the official website
www.python.org/downloads/ -
download
-
Installation (not much different from installing general software)
environment variable problem
Check: "Add Python to environment variable". This will add Python to the environment variable Path, and we can run the Python interpreter in the command line mode of windows.
4. Python development environment The
development environment is IDE (Integrated Development Environment) in English. Don't worry about which development environment to use. The development environment is essentially a package of the Python interpreter python.exe, and the core is the same. It can be said: "The development environment IDE is just a plug-in of the interpreter", just to make programming more convenient for programmers
and reduce the error rate, especially spelling errors.Common development environments are as follows:
IDLE, Pycharm, wingIDE, Eclipse, IPython -
Interactive mode (script shell mode)
enter the command line window, enter: python
5. Use in IDLE development environmentIDLE frequently used shortcut keys
Alt+N Alt+P: View the previous and next historical commands
Ctrl+F6: Restart the shell, all previously defined variables are invalid
F1: Open the help file
Alt+/: Automatically complete the previous words
Ctrl + [Ctrl + ]: Indent code and unindent
Alt+M: Open the module code, first select the module, and then press this shortcut key, it will help you open the py source code of the modified module for browsing.
Alt+C: Open the class browser for easy access Switch between each method body in the source file
F5: Run the program
7. The first Python source program
print("a")
print("b")
print("c")
The small points to note in the first Python program:
- Do not add spaces at the beginning of the line in the program.
- Spaces have the meaning of indentation in Python.
- The symbols are all English symbols, not Chinese. such as:(,"