title: Python write csv if condition is met
body: <p>I have a file named <code>y_and_n.csv</code>, and it looks like this:</p>
  
  <pre><code>Y,13,foo
  N,19,bar
  Y,37,boo
  Y,71,fiz
  N,29,buz
  </code></pre>
  
  <p>What's the best way to write a code in Python that saves a new file, <code>y_only.csv</code>, which would look like the text below?</p>
  
  <pre><code>Y,13,foo
  Y,37,boo
  Y,71,fiz
  </code></pre>