1. Constants
Constant unknown
Not Required
2. Number
Integer, long integer, floating point, plural
3. String
Single, double, and triple quotation marks can all represent strings.
R + String indicates the native string without escaping
U + string can represent Chinese
Addition achieves join and multiplication achieves multiple copies. "character". join (str) indicates that strings are separated by characters.
The eval () function converts a string type to code execution.
4. Variables
It starts with a letter and is case sensitive. It can contain _, which is the same as the variable naming rule in c.
5. Data Types
Number, String, linear container, hash container DIct, set
None indicates null
Logical type True, Flase
6. Operators and expressions
Operators have the same priority.
Logical statement:
If, eif, else:
Note that the next level should be indented.
Loop statement:
For in range () and for int xrange (header, tail, interval)
While condition:
Note that python does not have auto-incrementing auto-Subtraction
Else is supported after the loop statement.
7. Functions
Def function name (parameter = can have an initial value ):
If no value is returned, None is returned by default.
Functions can be copied directly.
You can declare a function before calling it.
You can add a help document to the function, and use the three quotation marks "" content ""