how to make a breakable loop in python

Solutions on MaxInterview for how to make a breakable loop in python by the best coders in the world

showing results for - "how to make a breakable loop in python"
Ivy
26 Sep 2020
1while True: # This calls for an infinite loop
2    print("Hello, World") 
3    # Stuff that is under this loop will go on for forever.
4    # Unstead of "True" you can insert anything -
5    # that you want just like using an "if". 
6    #It just like "if" but it goes on forever. For example:
7    
8x=3 # or anything like input....
9while x+3==6:
10  print("Hello, World")
11