Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def distance(strand_a, strand_b):
- val1 = list(strand_a)
- val2 = list(strand_b)
- count = 0
- if len(val1) == len(val2):
- for i in range(len(val1)):
- if val1[i] != val2[i]:
- count = count + 1
- return count
- else:
- raise Exception("ValueError")
- print(val1)
- print(val2)
- print(count)
- distance("ABCD","ABCD")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement