def jaccard_similarity(A, B):
    """
        A function computes a Jaccard_e similarity of 2 set.
                Parameters:
                            A: Set or List Integer of String.
                                Input
                            B: Set or List Integer or Str.
                                Input
                Returns:
                            score: double
                                Jaccard similarity
    """
    if len(A) == 0 or len(B) == 0:
        return 0.0
    A = set(A)
    B = set(B)
    X = set(A) & set(B)
    Y = set(A) | set(B)
    score = 0.0
    if len(Y) > 0:
        score = len(X) / len(Y)
    return score