title: Trying to Split One List into Multiple Lists Inside of a Main List - Python
body: <p>For some reason I get this traceback when trying to split comma delimited items into a new list and then inserting them into a higher list:</p>
  
  <pre><code>Traceback (most recent call last):
    File "S:/Personal Folders/Andy/Python Projects/People Cancelled/Analyze Customers Test.py", line 15, in &lt;module&gt;
      text[x] = textnew
  TypeError: list indices must be integers, not str
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>from __future__ import division
  from __future__ import print_function
  
  in_file = open("s:/Personal Folders/Andy/Python Projects/People Cancelled/Analyze Authorize Truncated.csv")
  text = in_file.readlines()
  in_file.close()
  
  header = text[0:1]
  text = text[1:]
  
  for x in text:
      textnew = x.split(",")
      text[x] = textnew
  
  print(text)
  </code></pre>
  
  <p>A sample of what data is being used:</p>
  
  <pre><code>['3545869260,59.95,AUTH_CAPTURE,Jack,Franklin,810-555-2222,jack@francypants.com,01-Apr-2011 05:24:10 PM PDT\n', '354589999,0,VOID,Jacob,Rasnip,8224309464,goodness@finland.com,01-Apr-2011 05:24:10 PM PDT\n']
  </code></pre>
  
  <p>I basically want to make each comma delimited piece of information INSIDE the list into a separate list, so basically a bunch of lists inside of one main list.</p>
  
  <p>Thanks!</p>