Juniper
JN0-224 · Question #155
Which Python operator is used to test if two variables are equal?
The correct answer is B. ==. In Python, the == operator is used to test whether two variables are equal. It returns True if the variables are equal and False if they are not. Option B (==) is correct because it is the equality operator in Python.
Python
Question
Which Python operator is used to test if two variables are equal?
Options
- A!=
- B==
- C%
- D=
How the community answered
(14 responses)- B86% (12)
- C7% (1)
- D7% (1)
Explanation
In Python, the == operator is used to test whether two variables are equal. It returns True if the variables are equal and False if they are not. Option B (==) is correct because it is the equality operator in Python.
Topics
#Python operators#equality operator#comparison operators#Python syntax
Community Discussion
No community discussion yet for this question.