title: Python 3 Login Program Using Dictionaries
body: <p>I am trying to create a login program for a project and I can't seem to figure out two things. The first is how to have the login info stored in the dictionary after i quit the program and the second is to figure out how to quit the program correctly. Thanks! Here is the source code.</p>
  
  <pre><code>#Dictionary
  users = {}
  #Used to quit/create/login users
  status = ""
  #Start Menu:Ask if user exists or create new user
  def Display_Menu():
      status =input("Are you a registered user? (Yes/No)? Press q to quit: ")
      if status == "Yes":
          Old_User()
      elif status == "No":
          New_User()
  #Creates New User
  def New_User():
      Create_Login =input("Create login name: ")
      if Create_Login in users:
          print ("Login name already exist!")
      else:
          Create_Password =input("Create password: ")
          users[Create_Login] = Create_Password
          print("New User created!")     
  #Login if old user
  def Old_User():
      login =input("Enter login name: ")
      Password =input("Enter password: ")
  
      if login in users and users[login] == Password:
          print("Login successful!")
      else:
          print("User doesn't exist or wrong password!")
  #Quits Program
  if status == "q":
      exit()
  while status !="q":
      Display_Menu()
  </code></pre>