break statement works and exits the loop properly but doesn't exit the program
break statement works and exits the loop properly but doesn't exit the program Question: print(f"n before loop is {n}") while True: for i in range(n): if n == 20: break else: print(n) n = n + 1 Enter n 10 n before loop is 10 10 11 12 13 14 15 16 17 18 19 …