CBSE Class 12 Computer Science Question 113 of 120

Review of Python Basics — Question 8

Back to all questions
8
Question

Question 8

Assignment operator can be used in place of equality operator in the test condition.

Answer

False

Reason — The assignment operator (=) is used to assign a value to a variable, whereas the equality operator (==) is used to compare two values for equality. Using the assignment operator in a test condition would result in assigning a value instead of comparing values. This can lead to unexpected behavior in code and may not achieve the intended comparison.