title: Python: Use variable as a lookup reference in CSV and return value
body: <p>Couldn't find an answer to this solution, so once I figured it out I thought I'd re-post my solution...</p>
  
  <p>I was looking for a way of taking a user input (<code>sys.argv[1]</code>) and use this value to perform a lookup in a CSV file for another value in column x (e.g. 5). This would be part of a larger script and I would use the looked-up value as a test.</p>
  
  <p>My example csv would be:</p>
  
  <pre><code>col0,col1,col2,col3,col4
  a,foo,bar,blah,1
  b,foo,bar,blah,2
  c,foo,bar,blah,3
  d,foo,bar,blah,4
  e,foo,bar,blah,5
  f,foo,bar,blah,6
  g,foo,bar,blah,7
  h,foo,bar,blah,8
  i,foo,bar,blah,9
  j,foo,bar,blah,10
  k,foo,bar,blah,11
  l,foo,bar,blah,12
  m,foo,bar,blah,13
  n,foo,bar,blah,14
  o,foo,bar,blah,15
  p,foo,bar,blah,16
  q,foo,bar,blah,17
  r,foo,bar,blah,18
  s,foo,bar,blah,19
  t,foo,bar,blah,20
  u,foo,bar,blah,21
  v,foo,bar,blah,22
  w,foo,bar,blah,23
  x,foo,bar,blah,24
  y,foo,bar,blah,25
  z,foo,bar,blah,26
  </code></pre>