If those file contents are called file1, file2 and file3 in order of appearance and are properly UTF-8 encoded text, then you can do it with the following one-liner:
 # python3 -c "x=open('file1').read(); y=open('file2').read(); print(x in y or y in x)"
 True
 # python3 -c "x=open('file2').read(); y=open('file1').read(); print(x in y or y in x)"
 True
 # python3 -c "x=open('file1').read(); y=open('file3').read(); print(x in y or y in x)"
 False