Computer Science
Assignment operator can be used in place of equality operator in the test condition.
Python Data Handling
3 Likes
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
2 Likes
Related Questions
The % (modulus) operator cannot be used with the float data type.
The range() function is used to specify the number of iterations to be performed in for loop.
Comments in Python begin with a "" symbol.
In print() function, if we use a concatenate operator (+) between two strings, both the strings are joined with a space in between them.