<AptiCode/>

Question 414: What is the purpose of the else block in a Pythonfororwhileloop?

tcs
wipro
infosys
general
aptitude
loops
python-programming

Theelseblock in a loop is executed when the loop condition becomes False, and the loop naturally exits.