title: How to split row of data into columns separated by comma in python
body: <p>I have a text file in the following format that I am trying to convert into rows and columns:</p>
  
  <pre><code>red,red,blue
  blue,red,blue 
  blue,blue,red
  </code></pre>
  
  <p>Once the conversion is complete, I want to store the above in a <code>rows</code> variable:</p>
  
  <pre><code>row[0] # should return 'red red blue'
  row[0][2] # should return 'blue'
  </code></pre>
  
  <p>So far I have gotten as far as:</p>
  
  <pre><code>file = open('myfile.txt')
  for row in file:
      # do something here
  </code></pre>
  
  <p>But i'm not sure what to do next.. can someone help? Thanks in advance!</p>