for line in difflib.unified_diff(lines1, lines2, fromfile='file1', tofile=
    'file2', lineterm='', n=0):
    for prefix in ('---', '+++', '@@'):
        if line.startswith(prefix):
            break
else:
    print(line)
Compare two files report difference in python