title: Remove NaN in a python list using max
body: <p>In a recent interview I was given the following problem.</p>
  <p>We have a list <code>l = [NaN, 5, -12, NaN, 9, 0]</code> and we want to replace<code>NaN</code> with <code>-9</code> using the <code>max</code> function knowing that <code>max(NaN, -9) = -9</code>. What I have tried is :</p>
  <pre><code>from numpy import   NaN
  
  l = [NaN, 5, -12, NaN, 9, 0]
  ll = [-9, 5, -12, -9, 9, 0]
  
  print([max(i) for i in zip(l, ll)])
  # output : [nan, 5, -12, nan, 9, 0]
  </code></pre>
  <p>but the output is still the same list. Can't figure out how to code this.</p>