title: Python - iterate over two lists and find matches and position of mis-matches
body: <p>I am working in Python 2.7</p>
  
  <p>I am trying to iterate over 2 lists, of un-equal length, and I want to create a new list, containing the matching elements (same elements in the same position), and when the elements do not match, I need to have some text as well as the position of the miss-matching elements.</p>
  
  <pre><code>list1=[1,2,3,4]
  list2=[1,2,3,5,6]
  </code></pre>
  
  <p>This outputs the matches</p>
  
  <pre><code>match=[[b] for a, b in zip(list1, list2) if a==b]
  </code></pre>
  
  <p>result:</p>
  
  <pre><code>[1,2,3]
  </code></pre>
  
  <p>But I do not know, <em>in a one-liner</em>, how to also flag the mis-matches:</p>
  
  <pre><code>[1,2,3,"nomatch-pos4"] 
  </code></pre>
  
  <p>or </p>
  
  <pre><code>[1,2,3,"nomatch-pos4","nomatch-pos5"]
  </code></pre>
  
  <p>It does not matter if it will iterate over the maximum or minimum of the 2 list lengths. </p>