Friday, March 25, 2022

Operators in Python

Hello Pythonist, here in this post I wiould like to share you about the all Python operators how they can coperates on the literals and variables at different sinarios. Unlike any other Programming languages,  Python supports wide variety of operators.

  1. Logical operators
  2. Comparison operators
  3. Bitwise operators

Let's explore more ...

Logical Operators

The Python Logical operators are simple English words

  •  and
  •  or
  •  not

All these above operators returns boolean values based on the combination of operands.


Comparison operators

There are several comparison operators as >, <, >=, <=, ==, != 

Also in operators


Bitwise Operators

Binary number 0 and 1 will be used as operands bitwise operators & | ^ and ~ allow us to manipulate single bits of data and they returns 0 or 1 based on the data bit values passed.


Python Bitwise Operator
Python Bit-wise Operators


Bit shift operators

  • Left bit-shift operator <<
  • Right bit-shift operator >>

1 comment:

DevOps Foundation course

DevOps Foundation course
Join us to learn DevOps from the Beginning