pip install python-Levenshtein python import Levenshtein python import Levenshtein distance = Levenshtein.distance(string1, string2)