title: NameError: name "user_choice1" is not defined
body: <p>I am trying out a simple program and keep getting this particular error:</p>
  
  <pre><code>line 34, in &lt;module&gt;
  user_choice1 == input("Do you want to exit or continue searching?")
  NameError: name 'user_choice1' is not defined
  </code></pre>
  
  <p>Here is the piece of code that is causing the error:</p>
  
  <pre><code>while True:
  choice = input("Do you want to add items?")
  if choice == "y":
      add_items()
      more = input("Do you want to add more items?")
      if more == "y":
          add_items()
      else:
          while True:
              user_choice = input("Adding items finished. Do you want to search items or exit?")
              if user_choice == "search":
                  search_item()
                  while True:
                      user_choice1 == input("Do you want to exit or continue searching?")
                      if user_choice1 == "continue":
                          search_item()
                          continue 
                      elif user_choice1 == "exit":
                          sys.exit()
                      else:
                          break                
              elif user_choice == "exit":
                  sys.exit
              else:
                  continue
  
  
  elif choice == "n":
      search_item()
      while True:
          user_choice2 = input("Searching finished. Do you want to continue or exit?")
          if user_choice2 == "continue":
              break
              continue
          elif user_choice2 == "exit":
              sys.exit()
          else:
              continue
  
  elif choice == "exit":
      sys.exit()
  
  else:
      print("Invalid Choice")
  </code></pre>
  
  <p>What is causing this error? I am using Python 3.5.2.
  Also, is there a better way to write this code as in, is there a way to optimize this code?</p>