title: Python - how to read/parse csv like line?
body: <p>I have done some search but most answer is about reading a complete csv file and none of these is like the problem I'm facing.</p>
  
  <p>I'm trying to read a file from net using urllib2:</p>
  
  <pre><code>request = urllib2.Request('http://.../tv.txt')
  response = urllib2.urlopen(request)
  lines = response.readlines()
  for line in lines:
      ...
  </code></pre>
  
  <p>The "line" format looks like these:</p>
  
  <pre><code>"ABC", "XYZ,MNO", "KLM"
  "ABC", "MN"
  "ABC", "123", "10", "OPPA GANGNAM STYLE", "LADY"
  </code></pre>
  
  <p>As seen above, these lines are not actually CSV lines. The number of columns keeps changing.</p>
  
  <p>Is there a way to split each line into a list? The desire result should be:</p>
  
  <pre><code>["ABC", "XYZ,MNO", "KLM"]
  ["ABC", "MN"]
  ["ABC", "123", "10", "OPPA GANGNAM STYLE", "LADY"]
  </code></pre>
  
  <p>I've tried using line.split(",") but it cannot split correctly because there is comma inside each pair of double quotes.</p>
  
  <p>Please help me if you know how to. Thank you very much.</p>
  
  <p>Cheers,</p>
  
  <p>PHP-Python-Java-MySQL-newbie.</p>