title: How to add to a list without overwriting it when calling a method for the second time?
body: <p>Here's an example of the code im trying to implement:</p>
  
  <pre><code>def notes():            
      print "\nPlease enter any notes:"
      global texts
      texts = []
      if not texts:
          print "no notes exist."
          write_note()
      else:
          print "this note already exists"
  
  def write_note():
      while True:
          global txt
          txt = raw_input("&gt;&gt;&gt; ")
          if not txt:
              break
          else:
              texts.append(txt)
      print "\nNote(s) added to report."
      notes_menu()
  
  def print_note():
      new_report.write("\nNotes:")
      for txt in texts:
          new_report.write("\n-%r" % txt)
      print "Note Printed to %r. Goodbye!" % file_name
      exit(0)
  </code></pre>
  
  <p>My goal here is to make it so if/when "notes()" is called a second(or ad infinitum) time the new inputs are added to "texts" list and dont overwrite the list. I tried attempting to at least determine if the list was empty whenever "notes()" is called. But every time I do, regardless of how many items ive created in "texts" during the previous calling, it always prints "no notes exist."</p>
  
  <p>I'm kind of at a loss at this point. I've looked into the dictionary function but im not sure how to incorporate it into this code. Anyone have any advice/suggestions?</p>