I am trying to compare 2 different strings and see how many of the letters match in its place:
str1 = 'afbhsnage'
str2 = 'afbfsnaee'
how do I compare both strings and find out how many of the letters match but they have to be the same index for it to match?
So for example, the first 3 letters in each string match, but the 4th letters don't match, and I'm looking to keep the score of how many of the letters match.
I know I need a loop that increments to check each index but I'm stuck at that part.