title: Count letter differences of two strings Python
body: <p>I'm having some problems with an exercise about strings in python.</p>
  <p>I have 2 different lists:</p>
  <pre><code>list1= &quot;ABCDEFABCDEF&quot;
  </code></pre>
  <p>and</p>
  <pre><code>list2= &quot;AZBYCXDWEVFABCDEF&quot;
  </code></pre>
  <p>I need to compare those 2 lists according to their position so the 1 letter together, then the 2...using the min length (so here length of list1) and store the letters in a new variable according to if they are different or the same.</p>
  <pre><code>identicals=[]
  different=[]
  </code></pre>
  <p>I tried to code something and it seems to find the same ones, but doesn't work on the different ones since it copies them multiple times.</p>
  <pre><code>for x in list1:
     for y in list2:
         if list1&gt;list2:
             if x==y:
                 identicals.append(x)
             if x!=y :
                 different.append(x)          
         if list2&gt;list1:
             if y==x:
                 identicals.append(y)
             if y!=x:
                 different.append(y)
  </code></pre>
  <p><strong>EDIT</strong>: Output result should be something like this:</p>
  <pre><code>identicals=['A']
  different=[&quot;Z&quot;,&quot;B&quot;,&quot;Y&quot;,&quot;C&quot;,&quot;X&quot;,&quot;D&quot;,&quot;W&quot;,&quot;E&quot;,&quot;V&quot;,F&quot;,&quot;A&quot;]
  </code></pre>
  <p>The thing is that the letter A is only shown on identicals but not in different even if F!=A.</p>