def jaccard_distance(w1, w2):
    """
    Parameters:
    -----------
      w1: str
      w2: str

    Returns:
    --------
      float: 
         Jaccard distance between w1 and w2 
    """
    ws1 = set(w1)
    ws2 = set(w2)

    if (len(ws1) > 1) or (len(ws2) > 1):
        dist = 1 - len(ws1.intersection(ws2))/len(ws1.union(ws2))
    else:
        dist = 0
    return dist