3.1 Data types
- Number (numeric) int, float, bool, complex (plural) int, expressed as a long integer and no long in Python2. There is no Boolean type in Python2, it is represented by the number 0 flase
- String (string) the strings in Python are enclosed in single quotation marks (') or double quotation marks ("), and use backslashes (\) to escape special characters.
3.2 Data Structures
list, denoted by [], lists can be used in many ways, such as indexing and interception. list=[a,b,1,2,3,4]
Tuples, tuples cannot be changed, and () indicate that elements are separated by commas. tup = (1, 2, 3, 4, 5, 6). Functions are returned in tuples
A dictionary, which is a type of mapping, represented by {}, is an unordered collection of objects. Dict={key:value,key2,value2}
Collection, which is a sequence of unordered repeats, denoted by {}, or set () function. Parame={value1,value2}
3.3 Data operations
Arithmetic operations, subtraction
Compare operations, compare sizes
Assignment operations, assigning values or references to variables
bitwise operations, by and or non-arithmetic, move the number of bits
Logical operations, logical Boolean values
Member scatter, in or not in, query member
Identity operation, is or not is, querying identities, comparing storage units of two objects
Python Getting Started tutorial learn notes # # Basic section