How many letters have changed to a string

advertisements

Hello I am fairly new at programming,

I would like to know is there a function or a method that allows us to find out how many letters have been changed in a string..

example:

input:

"Cold"

output:

"Hold"

Hence only 1 letter was changed

or the example:

input:

"Deer"

output:

"Dial"

Hence 3 letters were changed


I spoke too soon. First result googling:

https://pypi.python.org/pypi/python-Levenshtein/

This should be able to measure the minimum number of changes needed to get from one string to another.