title: Is there a way to permanently add to a list in python?
body: <p>I want to create a program that stores my race data in lists sorted my race length(I'm a runner). So when I add it, it add temporarily and as soon as I restart the code, it deletes the old one. I want it to permanently change the code and be added permanently.
  my code:</p>
  
  <pre><code>#All the sub-folders
  fivek = []
  tenk = []
  twomi = []
  sixteen = []
  eight = []
  four = []
  two = []
  Half = []
  Full = []
  
  #choose which folder
  distance = input("Length of Race? (5k, 10k, 2mi, 1600, 800, 400, 200, Half, Full)")
  if distance == "5k":
      time=str(input("What was your time? (Put date in parenthesis Ex. 20:00(1-1-20))"))
      fivek.append(time)
      print(fivek)
  </code></pre>
  
  <p>am I being clear enough? Let me know if I'm being too hazy.</p>
  
  <p>so using csv like this?</p>
  
  <pre><code>import csv
  
  time = []
  length = []
  place = []
  
  timeResult = input("What was your time?")
  lengthResult = input("What was the race length?")
  placeResult = input("Where was the race?")
  
  pace.append(placeResult)
  time.append(timeResult)
  length.append(lengthResult)
  
  with open('times.csv', newline='') as f:
      thewriter = csv.writer(f)
      thewriter.writerow([length, time, place])
  </code></pre>