- Related Questions & Answers
- What are basic JavaScript mathematical operators?
- What are different arithmetic operators in Python?
- What are different Identity operators types in Python?
- What are different assignment operators types in Python?
- What are different bitwise operators types in Python?
- Basic Operators in Python
- Basic operators in Java
- What are boolean operators in Python?
- What are different operators and expressions used in C language?
- What is different in | and OR operators in Python?
- Basic Operators in Relational Algebra
- Basic Operators in Shell Scripting
- What is different in & and AND operators in Python?
- What is different in OR and AND operators in Python?
- What are the basic scoping rules for python variables?

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

Operators in Python are classified as −

- + for addition
- - for subtraction
- * for multiplication
- / for division
- // for floor division
- % for modulo or remainder

- > for greater than
- >= for greater than or equal to
- < for less than
- <= for less than or equal to
- == for is equal to
- != for is not equal to

- and − true only if both operands are true
- or − true even if one operands is true
- not − true if operand is false and vice versa

- & for bitwise AND
- | for bitwise OR
- ~ for bitwise NOT
- ^ for bitwise XOR
- >> for bitwise right-shift
- << for bitwise left -shift

- = assign value on right to variable on left
- += add and assign
- -= subtract and assign
- *= multiply and assign
- /= divide and assign

- is − true if operands are identical
- is not − false if operands are not identical

- in − true if value present in sequence
- not in − false if value not present in sequence

Advertisements