title: Read CSV file line-by-line python
body: <p>I have a .csv file I am trying to read, but I'm having trouble. Please forgive me as this is a very remedial question:</p>
  
  <p>I'm trying to read a file line-by-line with the following:</p>
  
  <pre><code>with open('Book8.csv') as fp:
  for line in fp:
      print line
  </code></pre>
  
  <p>If I do this I print the whole file. like so:</p>
  
  <p>1,2,3</p>
  
  <p>4,5,6</p>
  
  <p>7,8,9</p>
  
  <p>However I only want to print the middle line so I put</p>
  
  <pre><code> with open('Book8.csv') as fp:
  for line in fp:
      print line[1]
  </code></pre>
  
  <p>This gives me </p>
  
  <p>�
  ,
  ,
  as my output. </p>
  
  <p>I want the output to be 4,5,6. It seems the commas or the [1] character in each line is being treated as part of the line. I'm not sure how to fix this. </p>
  
  <p>Eventually I'm going to want to do a regular expression on each of these lines to search for multiple substrings in each line.</p>
  
  <p>For example: </p>
  
  <p>Line 1: There is text I want in here that text is _:E28, _:K31 blah blah </p>
  
  <p>Line 2: There is text I want in here that text is _:H27, _:K12 blah blah </p>
  
  <p>Will it be possible to write a regex to create a list for each line containing only my text of interest?</p>
  
  <p>For example: List 1=["<em>:E28", "</em>:K31"]
  List 2=["_:H27", "_K12"]</p>