(seq1: Iterable[str], seq2: Iterable[str])
Measure the similarity between two sequences of strings as sets
    using the Jaccard index.

    Args:
        seq1
        seq2

    Returns:
        Similarity between ``seq1`` and ``seq2`` in the interval [0.0, 1.0],
        where larger values correspond to more similar sequences of strings

    Reference:
        https://en.wikipedia.org/wiki/Jaccard_index
Measure the similarity between two sequences of strings as sets
    using the Jaccard index.
Measure the similarity between two sequences of strings as sets using the Jaccard index .
def jaccard(seq1: Iterable[str], seq2: Iterable[str]) -> float:
    """
    Measure the similarity between two sequences of strings as sets
    using the Jaccard index.

    Args:
        seq1
        seq2

    Returns:
        Similarity between ``seq1`` and ``seq2`` in the interval [0.0, 1.0],
        where larger values correspond to more similar sequences of strings

    Reference:
        https://en.wikipedia.org/wiki/Jaccard_index
    """
    set1 = set(seq1)
    set2 = set(seq2)
    try:
        return len(set1 & set2) / len(set1 | set2)
    except ZeroDivisionError:
        return 0.0
def jaccard ( seq1 : Iterable [ str ] , seq2 : Iterable [ str ] ) -> float : set1 = set ( seq1 ) set2 = set ( seq2 ) try : return len ( set1 & set2 ) / len ( set1 | set2 ) except ZeroDivisionError : return 0.0