from functools import reduce

def remove_sublist(big_list, sub_list):
    result = reduce(lambda r, x: r[:1]+([1]+r[2:-r[1]],[min(len(r[0]),r[1]+1)]+r[2:])[r[-r[1]:]!=r[0]]+[x], big_list+[0], [sub_list, 1])[2:-1]
    print("remove_sublist(%s, %s) == %s" % (big_list, sub_list, result))
    return result


remove_sublist([], [1, 2])
remove_sublist([2, 1, 2, 3, 1, 2, 4], [1])
remove_sublist([2, 1, 2, 3, 1, 2, 4], [1, 2])
remove_sublist([2, 1, 2, 3, 1, 2, 4], [2, 1])
remove_sublist([2, 1, 2, 3, 1, 2, 4], [2, 3, 1])
remove_sublist([2, 1, 2, 3, 1, 2, 4, 1, 2], [1, 2])
remove_sublist([1, 2, 3, 1, 2, 4, 1, 2], [1, 2])
remove_sublist([1, 1, 2, 2, 3, 1, 2, 4], [1, 2])
