#in Python, break statements can be used to break out of a loop
for x in range(5):
print(x * 2)
if x > 3:
break
while True:
print("This runs forever")
break
print("oh, nm")
import random
# This loop will run forever unless we break it
while True:
# Generate a random int between 1 and 10
random_integer = random.randint(1, 10)
print(random_integer)
# Stop the loop if the random int is 5
if random_integer == 5:
break
for x in range(1,100):
if (x==11): break
print(x)