1. Home
  2. Data Science
  3. Python
  4. Which of the following is NOT a valid comparison operator…

Added 10 Feb 2024

Which of the following is NOT a valid comparison operator in Python?

  1. = Correct answer
  2. ==
  3. !=
  4. <>

Correct answer

A. =

18 views

MCQSEXAM

Explanation

In Python, the '=' operator is used for variable assignment, not for comparison. Comparison operators include '==', '!=', '<', '>', '<=', and '>='.

Reference

https://www.w3schools.com/python/python_operators.asp

Doubts & discussion

Not sure why the answer is A? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs