title: Python 3.4: adding value to list if condition exists
body: <p>i have a scenario like this one:</p>
  
  <pre><code>mainList = [[9,5],[17,3],[23,1],[9,2]]
  secondaryList = [9,12,28,23,1,6,95]
  myNewList = []
  
  myNewList.append([[a,b] for a,b in mainList if a in secondaryList])
  </code></pre>
  
  <p>this, return me to me:</p>
  
  <pre><code>myNewList = [[9,5],[23,1],[9,2]]
  </code></pre>
  
  <p>but I need only the first occourance of "a". In other words I need to obtain:</p>
  
  <pre><code>myNewList = [[9,5],[23,1]]
  </code></pre>
  
  <p>How can I achieve this? </p>