Comparing characters in strings
<p>I'm trying to create a function that compares characters in the same position of two strings of same length and returns the count of their differences.</p>

<p>For instance,</p>

<pre><code>a = "HORSE"
b = "TIGER"
</code></pre>

<p>And it would return 5 (as all characters in the same position are different)</p>

<p>Here's what I've been working on.</p>

<pre><code>def Differences(one, two):
    difference = []
    for i in list(one):
        if list(one)[i] != list(two)[i]:
            difference = difference+1
    return difference
</code></pre>

<p>That gives an error "List indices must be integers not strings"</p>

<p>And so I've tried turning it to int by using int(ord(</p>

<pre><code>def Differences(one, two):
    difference = 0
    for i in list(one):
        if int(ord(list(one)[i])) != int(ord(list(two)[i])):
            difference = difference+1
    return difference
</code></pre>

<p>Which also returns the same error.</p>

<p>When I print list(one)[1] != list(two)[1] it eithers returns True or False, as the comparison is correctly made.</p>

<p>Can you tell me how to correct my code for this purpose?</p>