breaking while loops
KianAlford (7)

I'm currently trying to make an RP game. all I need to do is break a few while loops. but a certain amount of times every time. I can't figure out how to do it.

https://repl.it/@KianAlford/RPG-adventure-1

You are viewing a single comment. View All
Mavrick (79)

Add multiple break statements is a solution to go down a controlled number of steps:

x = True
while True:
     # stuff
     while True:
          # stuff
          if x == True:
               break
     if x == True:
          break
#more stuff
KianAlford (7)

@Mavrick i just explained how that will not work