Vidyalelo
Python · Q24

Python MCQs: Variable Names and Operators Chapter

Programming · Python · question 24

Q24

What is the purpose of the == operator in Python?

A.
Assignment
B.
Comparison for equality
Answer
C.
Exponentiation
D.
Concatenation

Answer: Option B

Solution

Answer: Option B
Solution:
The == operator is used to compare if two values are equal.