title: How to split a string in a list and use the output to compare with a dictionary?
body: <p>Suppose my dictionary contains </p>
  
  <pre><code>{'one': '1','two': '2', ..., 'hundred': '100'}
  </code></pre>
  
  <p>and my list contains </p>
  
  <pre><code>[['for 30']['for thirty']]
  </code></pre>
  
  <p>I want to split the strings in the list as :</p>
  
  <pre><code>[for],[30] and [for],[thirty]
  </code></pre>
  
  <p>Then I want to use the <code>'thirty'</code> to compare with the corresponding entry in the dictionary and get <code>'30'</code> as output.</p>
  
  <pre><code>import csv
  
  reader = csv.reader(open('dict.csv', 'r'))
  d = {}
  for row in reader:
     k, v = row
     d[k] = v
  
  with open('test_term.csv', 'rb') as f:
      reader = csv.reader(f)
      your_list = list(reader)
  </code></pre>