Robotics & Artificial Intelligence
From the following, which is not a comparison operator in Python?
- ==
- !=
- >=
- <>
Python Control Flow
1 Like
Answer
<>
Reason — In Python, the valid comparison operators include ==, !=, and >=. The symbol <> is not a comparison operator in Python.
Answered By
2 Likes
Related Questions
In Python, what would be the condition to check if a value is not equal to 5?
- x =! 5
- x != 5
- x not= 5
- x == 5
In Python, which keyword is used to terminate a loop immediately?
- exit
- return
- break
- continue
What would be the result of the following expression?
15 > 12 and 2 < 1- True
- False
- Error
- None of these
Fill in the blanks:
- ……………. is used to repeat a block of code until a certain condition is met.
- ……………. statement in a loop is used to break the execution of the loop.
- ……………. keyword is used to create an empty loop.
- ……………. statement is used to skip the current iteration of the loop and move to the next.
- ……………. loop is used to iterate over a sequence of items.