can you use break and continue in a def while loop? python code example
Example 1: how to break a loop in python
x = 0
while True:
x += 1
if x == 10:
break
Example 2: while loop in python for do you want to continue
while input("Do You Want To Continue? [y/n]") == "y":
# do something
print("doing something")