I want to find the new words which are inserted into a text file using Python. For example:
Old: He is a new employee here.
New: He was a new, employee there.
I want this list of words as output: ['was', ',' ,'there']
I used difflib
but it gives me the diff in a bad formatted way using '+', '-' and '?'
. I would have to parse the output to find the new words. Is there an easy way to get this done in Python?