In brief
difflib compares sequences and can produce readable changes, including a unified diff. This helps review two versions of a text file.
Useful to know
difflib compares sequences and can produce readable changes, including a unified diff. This helps review two versions of a text file. [1]
Matching fragments does not establish identical meaning. Decide whether the comparison concerns lines, words or other elements. When producing HTML, escape external labels where required: a diagnostic view is still output presented to a reader.
Sources
For further detail and to check the information: