title: How to fix syntax error 'continue' not properly in a loop in python
body: <blockquote>
    <p>I want to create a simple database, which will store and return data.</p>
  </blockquote>
  
  <p>The problem is that <code>continue</code> doesn't seem to work.
  Once the <code>else statement</code> in <code>function checker</code> is executed it keeps printing <em>"try again"</em> and seems to be deadlocked.</p>
  
  <pre><code>def checker(): 
  #Checks if the password is strong enough
  while True:
     if (p[0].isupper() and not p.isalpha() and len(p) &gt; 7):
     print('Password Created!')
     break
  #If password is not strong enough try again
  else:
      print('Try Again')
      continue
  
  
  #Starts main program
  while True:
    database = {'dom':'yeet'}
    welcome = input('Welcome! To login press L, if you are new press R: ')
    #Login will log basically check if your info is in dictionary
    if welcome == 'L':
      for user in database.keys():
        u = input('Username: ')
        if u in user:
            for passw in database.values():
              p = input('Password: ')
              if p in passw:
                 print('Welcome ' + str(u))
                 break
    #Will create new user in dictionary
    elif welcome == 'R':
      u = input('Choose your username: ')
      p = input('Choose your password: ')
  
    #Runs checker function
      checker()
  
      database[u] = p
      print('Welcome ' + str(u))
      break
   else:
      continue
  </code></pre>