问题描述:
Write a function to find the nested list elements which are present in another list.

测试用例:
['assert intersection_nested_lists( [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14],[[12, 18, 23, 25, 45], [7, 11, 19, 24, 28], [1, 5, 8, 18, 15, 16]])==[[12], [7, 11], [1, 5, 8]]', 'assert intersection_nested_lists([[2, 3, 1], [4, 5], [6, 8]], [[4, 5], [6, 8]])==[[], []]', "assert intersection_nested_lists(['john','amal','joel','george'],[['john'],['jack','john','mary'],['howard','john'],['jude']])==[['john'], ['john'], ['john'], []]"]

生成的代码:
def intersection_nested_lists(main_list, nested_list):
    result = []
    for sublist in nested_list:
        # Find the intersection elements
        intersection = list(set(main_list) & set(sublist))
        result.append(intersection)
    return result