What is the difference between the != and <> operators in Python?


In Python 2.x, both != and <> operators are available to check if two operands are not equal. Both return true if operands are not equal and false if they are equal.

In Python 3.x, <> operator has been deprecated.

Updated on: 30-Jul-2019

160 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements