def jaccard_similarity(x, y):
    """ Returns the Jaccard Similarity Coefficient (Jarccard Index) between two 
    lists. 
    
    From http://en.wikipedia.org/wiki/Jaccard_index: The Jaccard
    coefficient measures similarity between finite sample sets, as is defined as
    the size of the intersection divided by the size of the union of the sample
    sets.
    """
    intersection_cardinality = len(set.intersection(*[set(x), set(y)]))
    union_cardinality = len(set.union(*[set(x), set(y)]))
    return intersection_cardinality / float(union_cardinality)