18 5 月, 2024

Manufacturing

Processing Machinery

100 days of proficiency in Python (The Basics) – Operators

1 min read
100 days of proficiency in Python (The Basics) – Operators

1. Arithmetic operators

is the symbol used to complete basic arithmetic operations and is used to process four operations  hmi panel tft

100 days of proficiency in Python (The Basics) – Operators

It can also be used for strings in python, and the result is the result of the string being repeated a specified number of times.*

print(“-” * 50)
# 打印结果如下:
# —————————————-

 

2. Comparison (relational) operator

100 days of proficiency in Python (The Basics) – Operators

3. Logical operators

100 days of proficiency in Python (The Basics) – Operators
4. Assignment operator

100 days of proficiency in Python (The Basics) – Operators
It can be used in Python to assign values to variables=
In arithmetic operations, a series of assignment operators corresponding to arithmetic operators are also provided to simplify code writingpython
Note: You cannot use spaces in the middle of the assignment operator

5. The precedence of the operator

The arithmetic priorities in the following table are listed in order from highest to lowest

100 days of proficiency in Python (The Basics) – Operators