The else block is executed after iterations and before program control exits loop block
x=0 while x<5: x=x+1 print (x) else: print ("else block of loop") print ("loop is over")
The else block is executed after iterations and before program control exits loop block
x=0 while x<5: x=x+1 print (x) else: print ("else block of loop") print ("loop is over")