title: Python how to go back to main menu
body: <p>This is my code I want it to go back to the main menu after I press a button</p>
  
  <pre><code>numberoftries = 3
  while numberoftries &gt; 0:
      print("You have 3 tries")
      username =(input("Enter the username"))
      password = (input("Enter the password"))
      if (password) == "password" and (username) == "MrLee123":
          import time
          time.sleep(1)
  
          print("Username and password accepted")
          print("Choose a student")
          print("1.) Hanif Adolecense")
          print("2.) Kerlo Sumpage")
          print("3.) Kearien Honter")
          print("4.) Mex Whitermen")
          print("5.) Tolu Ohyeahbola")
          print("Press enter to quit")
          answer = input("Select an option")
          numberoftries = 0
          if answer == "1":
                  print("Hanif Adolescense")
                  print("ID Number:12376")
                  print("Surname: Adolescense")
                  print("Forename: Hanif")
                  print("DOB: 24 Dec 2001")
                  print("Address: Somewhere in Nigeria")
                  print("Number: ")
                  print("Gender: Male")
                  print("Tutor group: G")
                  print("School email: 13h.adolecense@dallam.com")
  </code></pre>
  
  <p>how do I make go from an answer like 1 back to the menu</p>