So, I need to figure out a program that when you input 2 different strings of the same length it will return NOT print the number of differences between the two strings. The order of the characters matters as well.
For example if you input ("abcdef", "aabccf")
it should return 4.
("abcdef", "accddf")
should return 2.
All I have so far is:
def differencecount ( A, B): counter = 0 str1 = list (A) str2 = list (B) for letter in str1: if letter == str2: counter = counter + 1 return counter
All this does is return 0 though so I feel like I'm missing something.