Robotics & Artificial Intelligence
In Python, which keyword is used to terminate a loop immediately?
- exit
- return
- break
- continue
Python Control Flow
1 Like
Answer
break
Reason — The break keyword is used to terminate a loop immediately and transfer the control outside the loop.
Answered By
1 Like
Related Questions
How many conditions can be checked using the if-elif-elif-else statement?
- One
- Two
- Three
- Four
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
From the following, which is not a comparison operator in Python?
- ==
- !=
- >=
- <>
What would be the result of the following expression?
15 > 12 and 2 < 1- True
- False
- Error
- None of these