1. Interpreter Path
#!/usr/bin/env python
2. Encoding
#-*-Coding:utf8-*-
1.ascill---00000000 (8-bit representation)
Disadvantage: Cannot express English
2.unicode---0000000000000000+ (at least 16 digits)
Disadvantage: Memory consumption, when the expression bit does not need more than 16 bits, causing excess memory consumption
- 3.utf-8---How much to use is to express
Python3 no concern
Python2 each file appears in Chinese, the head must be added
3. Variable name
-Alphabet
-Digital
-Underline
Three-element constituent variables
- Cannot start with a letter
- cannot be a keyword (' and ', ' as ', ' assert ', ' Break ', ' class ', ' Continue ', ' Def ', ' del ', ' elif ', ' Else ', ' except ', ' exec ', ' finally ', ' For ', ' from ', ' global ', ' if ', ' import ', ' in ', ' was ', ' lambda ', ' not ', ' or ', ' pass ', ' print ', ' raise ', ' return ', ' Try ', ' W ' Hile ', ' with ', ' yield ')
- It's best not to repeat with Python's built-in function name
4. Recommended Programming Software
Pycharm
Python_ Foundation _01