Find differences of two protein sequence files
You can do this very easily using python sets as follows:
with open(&quot;file_a.txt&quot;, &quot;r&quot;) as f:
    data_a = f.read().splitlines()

with open(&quot;file_b.txt&quot;, &quot;r&quot;) as f:
    data_b = f.read().splitlines()

set(data_a) - set(data_b)

# {'----------------------MDVFKKGFSIAREGVVGAVEKTKQGVTEAAEKTKEGVMY',
#  '&gt;Q63544|72',
#  '&gt;Q63544|9',
#  'TKTKGERGTSVTSVAEKTKEQANAVSEAVVSSVNTVATKTVEEAENIVVTTGVVRKEDLEP'}