title: Unpacking a list from a function gives a list is not defined error
body: <pre><code>import os.path
  import re
  def request ():
      print ("What file should I write to?")
      file = input ()
      thing = os.path.exists (file)
      if thing == "true":
          start = 0
      elif re.match ("^.+.\txt$", file):
          stuff = open (file, "w")
          stuff.write ("Requests on what to add to the server.")
          stuff.close ()
          start = 0
      else:
          start = 1
      go = "yes"
      list1 = (start, file, go)
      return list1
  start = 1
  while start == 1:
      request ()
      (start, file, go) = list1
  </code></pre>
  
  <p>I try to return get list1 to return and unpack it in the loop so I can set variables that come after the while loop. Whenever I try and run this and enter "Thing.txt", I get <code>NameError: name 'list1' is not defined</code>. Am I missing something here?</p>