def remove_sublist(lst, sub):
i = 0
out = []
while i < len(lst):
if lst[i:i+len(sub)] == sub:
i += len(sub)
else:
out.append(lst[i])
i += 1
return out
print(remove_sublist([1, 'a', int, 3, float, 'a', int, 5], ['a', int]))
ZGVmIHJlbW92ZV9zdWJsaXN0KGxzdCwgc3ViKToKICAgIGkgPSAwCiAgICBvdXQgPSBbXQogICAgd2hpbGUgaSA8IGxlbihsc3QpOgogICAgICAgIGlmIGxzdFtpOmkrbGVuKHN1YildID09IHN1YjoKICAgICAgICAgICAgaSArPSBsZW4oc3ViKQogICAgICAgIGVsc2U6CiAgICAgICAgICAgIG91dC5hcHBlbmQobHN0W2ldKQogICAgICAgICAgICBpICs9IDEKICAgIHJldHVybiBvdXQKCnByaW50KHJlbW92ZV9zdWJsaXN0KFsxLCAnYScsIGludCwgMywgZmxvYXQsICdhJywgaW50LCA1XSwgWydhJywgaW50XSkp