title: UnboundLocalError: local variable 'text_in_use' referenced before assignment
body: <p>I can set the variable and print it directly after if choice == 1. But if choice == 2 i cant print it out the text that was set, I get an error.</p>
  
  <p>(UnboundLocalError: local variable 'text_in_use' referenced before assignment)</p>
  
  <p>How can i fix this?</p>
  
  <pre><code>text_in_use = ''
  encrypt_key = ''
  
  def menu():
      choice = int(input("""1: Input text to work with
  2: Print the current text
  3: Encrypt the current text
  4: Decrypt the current text
  5: Exit
  Enter Choice: """))
  
      if choice == 1:
         text_in_use = str(input("Enter Text: ")).upper()
         print("Text to use was set to:", text_in_use)
         menu()
      elif choice == 2:
          print(text_in_use) #this is where i get the error &lt;-----
          menu()
      elif choice == 3:
          print("3")
          menu()
      elif choice == 4:
          #decrypt()
          print("4")
          menu()
      elif choice == 5:
          #exit()
          print("5")
          menu()
  
  menu()
  </code></pre>
  
  <p>i just want it to print the text that was set.</p>