def contains(whole, sub):
    """
    Return 1 if whole contains sub, 0 otherwise
    """
    if whole == sub:
        return 1
    for elem in sub:
        if elem not in whole:
            return 0
    return 1
