[Python] liberal arts students zero basic programming Series 3-basic types of data operators,
Previous Article: [Python] NJI programming Series II-basic concepts of data types, variables, and constants
Next article:
Simply put,The operator is the bridge to connect.
※The execution process of a program is the process of calculating data.
Different Data Types support different operations,
FollowDifferent data operation types, AndDivided into different data operators.
4.1 Data Operators: (Python is used as an example)
4.1.1 Arithmetic Operators
Scope of use: arithmetic operation
Return Value Type: Numeric
Symbol list: (see figure)
4.1.2 comparison (relational) Operator
Scope of use: Comparison
Return Value Type: boolean
Return Value: True or False
Symbol list: (see figure)
4.1.3 value assignment operator
Usage scope: Value assignment
Return Value: reference of the left operand (the number returned by the value assignment operator is not the value of the variable, but the address of the variable .)
Symbol list: (see figure)
4.1.4 logical operators
Scope of use: Determine whether the logic formula is true or false
Involved data type: Logical Data
Return Value Type: boolean
Return Value: True or False
Symbol list: (see figure)
4.1.5 bitwise operators
Scope of use:
Symbol list: (see figure)
4.1.6 member operators
Scope of use: used to determine whether a member is true or false in a specified sequence.
Return Value Type: boolean
Return Value: True or False
Symbol list: (see figure)
4.1.7 identity Operators
Scope of use:
Return Value Type:
Return Value:
Symbol list: (see figure)
4.2 operator priority:
Previous Article: [Python] NJI programming Series II-basic concepts of data types, variables, and constants
Next article: