KnowledgeBoat Logo

Computer Science

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

Python Data Handling

1 Like

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.

Answered By

1 Like


Related Questions