Overview:
- The make_file() method of HtmlDiff class returns the differences between two lists of lines in HTML format. The two HTML tables highlights the differences including added, changed and deleted lines.
Example:
|
# Example Python program that compares two lists of strings import difflib # Create a HTMLDiff object # From lines as a list # To lines as a list # Compare fromLines vs to toLines # Write HTML to a file |
Output - HTML visualized:

Output - HTML text:
|