title: Split every word in line by comma, then store entire line in list
body: <p>I was wanting to read in a file which has 4 values on each line:
  title, author, genre, price.</p>
  
  <p>I want to split each value which has a ',' as the delimiter. Then I want to save it to my List each line being an entry in the list. For example</p>
  
  <pre><code>title, author, genre, price
  
  title2, author2, genre2, price2
  </code></pre>
  
  <p>This will save as</p>
  
  <pre><code>List[0][1] = title 
  List[0][2] = author 
  List[0][3] = genre 
  List[0][4] = price
  
  List[1][1] = title2
  List[1][2] = author2 
  List[1][3] = genre2 
  List[1][4] = price2
  </code></pre>
  
  <p>This is what I have so far:</p>
  
  <pre><code>def readFile(fileName):
  List = []
  f = open(fileName, 'r')
  line = f.readline()
  x = 0
  while len(line) != 0:
      for i in range(4):
          List[x][i] = line.split(',')
      x += 1
      line = f.readline()
  f.close()
  return List
  </code></pre>
  
  <p>But I'm just getting <code>List index out of range</code>.</p>