demo_while_else.py:
i = 1 while i < 6: print(i) i += 1 else: print("i is no longer less than 6")
C:\Users\My Name>python demo_while_else.py
1
2
3
4
5
i is no longer less than 6