I have the following function that gets a source and a modified strings, and bolds the changed words in it.
def appendBoldChanges(s1, s2): \"Adds &l
Have a look at the difflib module, you could use a SequenceMatcher to find the changed regions in your text.