Which of the following is not a valid operator in Python?
2023
Which of the following is not a valid operator in Python?
- A.
==
- B.
=>
- C.
//
- D.
**
Attempted by 1999 students.
Show answer & explanation
Correct answer: B
Answer: => is not a valid Python operator. Explanation (English): == : equality operator — compares two values and returns True if they are equal.
=> : not an operator in Python. For 'greater than or equal to' use >=. The symbol => is used in some other languages but is invalid in Python expressions.