Learn Before
Concept

Comparison Operators in Python

Comparison operators are often used in true/false statements and loops to compare two objects. There are six comparison operators:

  • equal to: denoted by ==
  • not equal to: denoted by != or <>
  • greater than: denoted by >
  • greater than or equal to: denoted by >=
  • less than: denoted by <
  • less than or equal to: denoted by <=

0

1

Updated 2021-08-25

Tags

Python Programming Language

Data Science