Using the answer from here
Use the following python function:
def sublistExists(list1, list2):
return ''.join(map(str, list2)) in ''.join(map(str, list1))
In action:
In [35]: a=[i.strip() for i in open("f1")]
In [36]: b=[i.strip() for i in open("f2")]
In [37]: c=[i.strip() for i in open("f3")]
In [38]: a
Out[38]: ['abc', 'def', 'ghi', 'jkl']
In [39]: b
Out[39]: ['def', 'ghi']
In [40]: c
Out[40]: ['abc', 'ghi']
In [41]: sublistExists(a, b)
Out[41]: True
In [42]: sublistExists(a, c)
Out[42]: False