Which of the following is not a valid operator in Python?
2023
Which of the following is not a valid operator in Python?
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…
- A.
==
- B.
=>
- C.
//
- D.
**
Attempted by 2502 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.
Loading lesson…