Skip to content

Commit 2447e62

Browse files
authored
Operators in python
In Python, operators are symbols that represent different operations, such as mathematical computations or logical comparisons, on one or more operands. Commonly used operators in Python: 1. **Arithmetic Operators**: - Addition: "+" - Subtraction: "-" - Multiplication: "*" - Division: "/" - Modulo (remainder): "%" - Exponentiation: "**" - Floor Division (integer division): "//" 2. **Assignment Operators**: - Assignment: "=" - Addition assignment: "+=" - Subtraction assignment: "-=" - Multiplication assignment: "*=" - Division assignment: "/=" - Modulo assignment: "%=" - Exponentiation assignment: "**=" - Floor Division assignment: "//=" 3. **Comparison Operators**: - Equal to: "==" - Not equal to: "!=" - Greater than: ">" - Less than: "<" - Greater than or equal to: ">=" - Less than or equal to: "<=" 4. **Logical Operators**: - Logical AND: "and" - Logical OR: "or" - Logical NOT: "not" 5. **Bitwise Operators**: - Bitwise AND: "&" - Bitwise OR: "|" - Bitwise XOR: "^" - Bitwise NOT: "~" - Left shift: "<<" - Right shift: ">>" 6. **Membership Operators**: - In: "in" - Not in: "not in" 7. **Identity Operators**: - is: "is" - is not: "is not" These operators are used to perform various operations in Python such as arithmetic calculations, assignment of values, comparison of values, logical operations, bitwise operations, and more.
1 parent 01310f1 commit 2447e62

File tree

3 files changed

+1855
-0
lines changed

3 files changed

+1855
-0
lines changed

0 commit comments

Comments
 (0)