title: How to check if an item in a dictionary exists in CSV file?
body: <p>I have a dictionary and a CSV file (which is actually tab delimited):</p>
  
  <p><code>dict1</code>: </p>
  
  <pre><code>{1 : ['Charles', 22],
  2: ['James', 36],
  3: ['John', 18]}
  </code></pre>
  
  <p><code>data.csv</code>:</p>
  
  <pre><code>
  [ 22 | Charles goes to the cinema | Activity    ]
  [ 46 | John is a butcher          | Profession  ]
  [ 95 | Charles is a firefighter   | Profession  ]
  [ 67 | James goes to the zoo      | Activity    ]
  </code></pre>
  
  <p>I want to take the string (name) in the first item of <code>dict1</code>'s value and search for it in the second column of the csv. If the name appears in the sentence, I want to print the first (and only the first) sentence.</p>
  
  <p>But I am having problem with the searching - how do I access the column/row data while iterating through <code>dict1</code>? I have tried something like this:</p>
  
  <pre><code>with open('data.csv', 'r', encoding='utf-8') as file:
      reader = csv.reader(file, delimiter='\t')
      for (id, (name, age)) in dict1.items():
          if name in reader.row[1] # reader.row[1] is wrong!!!
          print(reader.row[1])
  </code></pre>