(percent, string1, string2)
return dist / max_len <= percent
Returns True if Levenshtein distance between string1 and string2,
    divided by max length, is less than or equal to the given percent.

    :param percent: Percent expressed as a decimal between 0 and 1
    :param string1: First string to compare
    :param string2: Second string to compare
    :return: True or False

    >>> le_levenshtein_percent(0.2, 'Riyaz', 'Riaz')
    True
    >>> le_levenshtein_percent(0.2, 'Riyaz', 'Riazz')
    False
Returns True if Levenshtein distance between string1 and string2,
    divided by max length, is less than or equal to the given percent.
Returns True if Levenshtein distance between string1 and string2 divided by max length is less than or equal to the given percent .
def le_levenshtein_percent(percent, string1, string2):
    """
    Returns True if Levenshtein distance between string1 and string2,
    divided by max length, is less than or equal to the given percent.

    :param percent: Percent expressed as a decimal between 0 and 1
    :param string1: First string to compare
    :param string2: Second string to compare
    :return: True or False

    >>> le_levenshtein_percent(0.2, 'Riyaz', 'Riaz')
    True
    >>> le_levenshtein_percent(0.2, 'Riyaz', 'Riazz')
    False

    """
    if not 0 <= percent < 1:
        raise ValueError('percent must be greater that or equal to 0 and less than 1')
    dist = levenshtein_distance(string1, string2)
    max_len = max(len(string1), len(string2))
    return dist / max_len <= percent
def le_levenshtein_percent ( percent , string1 , string2 ) : if not 0 <= percent < 1 : raise ValueError ( 'percent must be greater that or equal to 0 and less than 1' ) dist = levenshtein_distance ( string1 , string2 ) max_len = max ( len ( string1 ) , len ( string2 ) ) return dist / max_len <= percent