Which relational operator checks for equality in Python?

a
=
b
==
c
!=
d
>=

1 answer

The relational operator that checks for equality in Python is:

b) ==

Here’s a brief explanation of the other operators listed:

  • a) =: This is the assignment operator, not a relational operator.
  • c) !=: This checks for inequality (not equal to).
  • d) >=: This checks if a value is greater than or equal to another value.