The most basic data structure of Python is the sequence
The six built-in data structures are: list, tuple, string, Unicode string, buffer object and Xrange object
2. Basic data types (variable and immutable types) (single and double quotes are not distinguished, integers are not used, Boolean numbers are not, the type method can view types)
Integral: Integral type (immutable type, view with ID method, Integer object ID is different) and Boolean (True&false)
Floating-point types: floating-point numbers, complex numbers (3+2j), decimal digits
String (immutable type, must be in quotation marks, single double quotation marks are not distinguished): It's already a sequence, you can extract a part of it.
3. Naming rules
Numbers, letters, underscores
Note that, _x,_x_,__x, this type has a special meaning in Python, unless you have a special need to avoid conflicts with definitions in the system as quickly as possible.
It is also important to note that in Python, the variable name has no data type, its object has a data type, such as name = 1.23, at this point, the name Object data type is float, again, name = Tom, then the name Object data type is a string, so, with C, The difference between strongly typed variable references in Java
The list is defined by [], which is a variable type variable, which belongs to a nested type
Tuples are defined by (), are immutable type variables, are also nested, note the models that understand their memory, they are references in modifying data structures, and can be understood to point to problems
4. Logical operators
4 Set of Operators
A. Identity operator: is
B. Comparison operator: >,<,>=.<=,!=,==
C. Member operators: In, No in
D. Logical operator: And,or,not
Python Learning Notes