title: How to indicate change of order in the one tuple when comparing two tuples in python?
body: <p>I am facing a problem with comparing following tuples:</p>
  <pre><code>chains = ['A','B','C','D']
  proper_list = ['ABBA','BDDA','CDDA','ABBA']
  corrupted_list = ['ABBA','CDDA','BDDA','ABBA']
  
  proper_set = tuple(zip(chains, proper_list))
  corrupted_set = tuple(zip(chains, corrupted_list))
  </code></pre>
  <p>The output of both is as follows:</p>
  <pre><code>(('A', 'ABBA'), ('B', 'BDDA'), ('C', 'CDDA'), ('D', 'ABBA')),
  (('A', 'ABBA'), ('B', 'CDDA'), ('C', 'BDDA'), ('D', 'ABBA'))
  </code></pre>
  <p>I would like to somehow print out the updated tuple, where an algorithm could find and indicate improper element assigned to value, as follows:</p>
  <pre><code>(('A', 'ABBA'), ('C', 'CDDA'), ('B', 'BDDA'), ('D', 'ABBA'))
  </code></pre>
  <p>or at least yield the list with proper order:</p>
  <pre><code>['A','C','B','D']
  </code></pre>
  <p>As the elements in proper/corrupted lists may  be duplicated I cannot (or am not able to) use dict.</p>
  <p>Assumptions:</p>
  <ul>
  <li>lengths of both lists and elements will always be equal</li>
  <li>the order of any element in corrputed_list may differ</li>
  </ul>
  <p>What could you suggest to solve this problem?</p>