calc levenshtein distance in python for comparing strings in search algoriths