title: Align two lists and do action on aligned and miss-aligned objects
body: <p>I try to find a way to align two lists of objects (sorted by it's value) and by comparing it's value , do a action if objects are aligned in both lists and another action if not. For example kids with he's name and age, and use age value to align them.</p>
  
  <p>To make the example simple, try with just two sorted list of integer values:</p>
  
  <pre><code>a = (1,2,3,6,7,11,13)
  b = (2,3,4,6,7,9)
  </code></pre>
  
  <p>I want to align them like this:</p>
  
  <pre><code>+----+----+----+----+----+----+----+----+----+
  | 01 | 02 | 03 | xx | 06 | 07 | xx | 11 | 13 |
  +----+         +----+         +----+----+----+
  | xx | 02 | 03 | 04 | 06 | 07 | 09 | xx | xx |
  +----+----+----+----+----+----+----+----+----+
  </code></pre>
  
  <p>To do a action on aligned value (append it to a list1 for example):</p>
  
  <pre><code>list1 = [2,3,6,7]
  </code></pre>
  
  <p>And doing action on miss-aligned value (append it to a list2 for example):</p>
  
  <pre><code>list2 = [1,4,9,11,13]
  </code></pre>
  
  <p>or just doing a print if aligned or not:</p>
  
  <pre><code>1 = miss-aligned
  2 = aligned
  3 = aligned
  4 = miss-aligned
  6 = aligned
  7 = aligned
  9 = miss-aligned
  11 = miss-aligned
  13 = miss-aligned
  </code></pre>
  
  <p>I try this way but ...</p>
  
  <pre><code>a = (1,2,3,6,7,11,13)
  b = (2,3,4,6,7,9)
  list1 = []
  list2 = []
  
  # find sames and list a different value
  for x in a:
      for y in b:
          if x == y:
              list1.append(x)
              print(x," = aligned")
              break
          if y == b[-1]:
              print(x," = miss-aligned")
              list2.append(x)
  
  # find list b different value
  for y in b:
      for x in a:
          if x == y:
              break
          if x == a[-1]:
              print(y," = miss-aligned")
              list2.append(y)
  
  print('Same:',list1)
  print('Different:',list2)
  </code></pre>
  
  <p>... I get this non-desired ouput (not doing action in good order for 4 and 9):</p>
  
  <pre><code>1  = miss-aligned
  2  = aligned
  3  = aligned
  6  = aligned
  7  = aligned
  11  = miss-aligned
  13  = miss-aligned
  4  = miss-aligned
  9  = miss-aligned
  Same: [2, 3, 6, 7]
  Different: [1, 11, 13, 4, 9]
  </code></pre>
  
  <p>I try many others way without success.</p>
  
  <p>*edit: No duplicate of value in the same list</p>