def intersect(t1,t2):
    """Assumes t1 and t2 are tuples
    Returns a tuple containing the elements that area in 
    both t1 and t2"""
    result = ()
    for element in t1:
        if element in t2:
            result += (element,)
    return result