title: How to check strings in list
body: <p>I have a string:</p>
  
  <pre><code>a = "sky high"
  </code></pre>
  
  <p>and a file in csv style that I have opened and converted to list:</p>
  
  <pre><code>mylist = [["sky high",'77'],["sky high and high",'88']]
  </code></pre>
  
  <p>I want to check if the string exist in the first position in every list. But, if I do this:</p>
  
  <pre><code>for row in mylist:
      if a in row[0]:
         print row[1]
  </code></pre>
  
  <p>it will give me result <code>77 88</code> instead of just <code>77</code>. I don't know why I can't use if <code>a == row[0]</code> as it will produce no result. Have any idea what to do?</p>
  
  <p>EDIT:</p>
  
  <p>So actually my code looks like this:</p>
  
  <pre><code>data = open("text.qrel",'rb')
  new = []
  for row in data:
      d = row[:-1].split(',')
  
      if a == d[0]:
         new.append(d[1])
  </code></pre>
  
  <p>and it doesn't work!</p>