Use else with the while loop in Python programming language.
n = 1 while n <= 10: print(n) n = n + 1 else: print('The loop is over.')
Output:
1 2 3 4 5 6 7 8 9 10 The loop is over.