def minimum_edit_distance(s1,s2):
    """Calculates Levenshtein distance for strings s1 and s2
    Source: https://rosettacode.org/wiki/Levenshtein_distance#Python
    
    Arguments:
        s1 {str} -- string 1
        s2 {str} -- string 2
    
    Returns:
        int -- distance
    """
    if len(s1) > len(s2):
        s1,s2 = s2,s1
    distances = range(len(s1) + 1)
    for index2,char2 in enumerate(s2):
        newDistances = [index2+1]
        for index1,char1 in enumerate(s1):
            if char1 == char2:
                newDistances.append(distances[index1])
            else:
                newDistances.append(1 + min((distances[index1],
                                             distances[index1+1],
                                             newDistances[-1])))
        distances = newDistances
    return distances[-1]