title: Python, How to save user input to list
body: <p>I am looking to take a list that contains data in it and append it so that it will save next time i execute the code. So far i have this that works, but when i execute the code again it does not include the new data that was entered. Any suggestions?</p>
  
  <pre><code>def the_list():
  
      data = ['data1', 'data2', 'data3 ' , 'data4', 'data5' ]
  
      for i in data:
          print (i)
  
      print (' would you like to add')
      a = input()
  
      if a == ('yes'):
          b = input()
  
          data.append(b)
          print (data) 
  
  the_list()
  </code></pre>