title: Searching and Matching a part of a string in a CSV file using Python
body: <p>This is a part of a large csv file which I have:</p>
  
  <pre><code>"66.35.223.128","66.35.223.143","1109647232","1109647247","AU","Australia"
  "66.35.223.144","66.35.227.191","1109647248","1109648319","US","United States"
  "66.35.227.192","66.35.227.207","1109648320","1109648335","JP","Japan"
  "66.35.227.208","66.35.230.31","1109648336","1109648927","US","United States"
  "66.35.230.32","66.35.230.47","1109648928","1109648943","AU","Australia"
  "66.35.230.48","66.35.236.207","1109648944","1109650639","US","United States"
  "66.35.236.208","66.35.236.223","1109650640","1109650655","AU","Australia"
  "66.35.236.224","66.36.127.255","1109650656","1109688319","US","United States"
  </code></pre>
  
  <p>The first two columns are a range of IP addresses.
  I have an IP address 66.35.250.168
  I need to search the csv file to see in which range it lies, and print out the corresponding country name.</p>
  
  <p>Since the first two numbers (66,35) are the same, I intend to search for the line containing this.
  I can search a complete string(66.35.205.88) by doing this:</p>
  
  <pre><code>import csv
  with open('GeoIPCountryWhois.csv', mode='r') as f:
      reader = csv.reader(f)
      for row in reader:
          if row[0] in ['66.35.205.88']:
              print row
  </code></pre>
  
  <p>If I search for 66.35, I don't get any result .
  Can you please tell me a way in which I can search for a part of the string ('66.35' here) ?
  Also, can you tell me how I can find the exact line number in which I find the string? </p>
  
  <p>Thanks in advance.</p>