Q. What is the difference between else clause of if-else and else clause of Python loops?


Answer =

The else clause of an if statement is executed when the condition of the if statement result into false. The else clause of loop is executed when the loop is terminating normally, when its test –condition has gone false for a while loop or when the for loop has executed for the last value in sequences.

You can uderstand by watching videos -----


1 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post