1. Module Import
Import xxx or from xxx import xxx, try to avoid using from XXX import *
2. Variables, constants
Local variables: can only be used within a function or within a class to assign values and change values
Global variables: Can be used in all functions or classes to assign values and change values
Constants: Determined values, cannot be assigned and change values
3. Data type
Integer: If 2
Floating point number: if 2.2
String: "abc"
Boolean value: True/false
List: [2,3,4]
Dictionary (dict): {"name": "Jack", "Age": "30"}
Null value: None
4. Process Control
If
For
While
Break: Jumps out of the current loop and exits the loop
Continue: Jump out of the current loop and proceed to the next loop
5. File reading and writing
Excel read-write module: XLRT, XLWT
XML read-write module:
6. Error handling
Try
Except
7. DateTime, TIME
DateTime formatting
String converted to DateTime
DateTime Conversion to String
8. Request
Python Basics-ongoing updates