title: How to make the code jump back instead of forward?
body: <p>I was working with a mastermind assignment but one of my define function isn't working as expected.</p>
  <p>How do I make the &quot;quit&quot; jump back to &quot;have a guess...&quot; instead of continue to the colourlst?</p>
  <pre><code>def valid_usercolour():
      while True:
          #print('Welcome to the Mastermind') 
          usercolour = input('Please have your guess [r,o,y,g]: ').lower()
          if 'quit' in usercolour:    
              while True:
                  dc_quit = input('Do you really wanted to quit the game?[y/n]: ')
                  if dc_quit.lower() == &quot;y&quot;:
                      print()
                      print('Alright, thank You for playing, Goodbye', user_name, '!' )
                      quit()
                      break 
                  elif dc_quit.lower() == &quot;n&quot;:
                      print(&quot;Alright, let's continue to our game&quot;)
                      break
                  else:
                      print(&quot;Sorry! I don't understand what you mean, could you please type only [Y/N]&quot;)
                      continue
                        
          colourslist = ['r','o','y','g']
          if any(character not in colourslist for character in usercolour):
              print(&quot;Error! Only Characters ,&quot;, colourslist, &quot;are allowed&quot;)
              continue
          if len(usercolour) != 4:
              print(&quot;Error! Only 4 characters are allowed!&quot;)
              continue
          break
      return usercolour
  </code></pre>