title: the calculation conditions IF in dictionaray
body: <p>I don't understand the calculation condition <code>IF</code> if dictionary :-</p>
  
  <p>Why when the code </p>
  
  <pre><code>dlist = [{'Bilbo':'Ian','Frodo':'Elijah'} , {'Bilbo':'Martin','Thorin':'Richard'}]
  
  k = 'Bilbo'
  
  [ ks[k] if k in ks else 'NOT PRESENT' for ks in dlist]
  </code></pre>
  
  <p>But I when  wrote the code</p>
  
  <pre><code>[ ks[k]  for ks in dlist if k in ks else 'NOT PRESENT' ] 
  </code></pre>
  
  <p>I get a <code>SyntaxError: invalid syntax</code></p>