title: How can I convert a string in a file back to a list in Python?
body: <p>I'm writing a tournament creator for a game that lacks it, just for personal use. It's a good exercise for school... however, I've stumbled upon a problem while finishing up the program.</p>
  
  <p>So after the participants for the tournament have been decided, I ask the user (myself, my cousin too at most, if he comes over) if he wants to save the current list of participants. If so, a list containing the participants gets written to a file: </p>
  
  <pre><code>fileWrite = open('Previous Participants', 'w')
  fileWrite.write(str(participants2))
  fileWrite.close()
  </code></pre>
  
  <p>however, this converts the list to a string, so if I want to read it out the next time the program is run... I have a string. Not a list and I need the list for the tournament creator itself (randomizing the fights, etc).</p>
  
  <p>So... how do I get this string back as a list? The problem is, I can use split, I think, but I believe that participant names with spaces would then be a problem.</p>
  
  <p>Currently the file has this string from last time: </p>
  
  <pre><code>['Cell', 'Lord Slug', 'Time Patroller', 'Gotenks', 'Omega Shenron', 'Nail', 'Time Breaker Bardock', 'Piccolo', 'Frieza', 'Mr. Satan', 'Beerus', 'Nappa', 'Raspberry', 'Goten', 'Vegito', 'Goku']
  </code></pre>
  
  <p>Participants like 'Lord slug' will cause a problem if I do:</p>
  
  <pre><code>ownCharacters = input('Do you wish to use the same participants as last time? ')
  if ownCharacters == 'yes' or ownCharacters == 'Yes':
      try:
          fileRead = open('Previous Participants', 'r')
          participants2 = fileRead.read()
          participants2.split
      except FileNotFoundError:
          participants2 = participants2
  </code></pre>
  
  <p>Won't they? 
  BTW participants2 has already been filled in with random names when the program arrives at this point, so if the file does not exist it should continue using the random names.</p>