Python Programming - Loops
Exercise : Loops - General Questions
- Loops - General Questions
31.
Which of the following statements accurately describes the behavior of the
else
block in a Python try-except
statement?
Answer: Option
Explanation:
The
else
block in a try-except
statement is executed when the try block completes without any exceptions.
32.
What is the purpose of the
sorted
function in Python when used with loops?
Answer: Option
Explanation:
The
sorted
function in Python is used to sort the elements in ascending order.
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers