Skip to content

Instantly share code, notes, and snippets.

@dragon-dxw
Last active August 17, 2023 12:26
Show Gist options
  • Save dragon-dxw/5e70c6dc843654a2e026d6ce15fcfc5c to your computer and use it in GitHub Desktop.
Save dragon-dxw/5e70c6dc843654a2e026d6ce15fcfc5c to your computer and use it in GitHub Desktop.
diff_match_patch.py
# pip install diff_match_patch
import diff_match_patch as dmp_module
dmp = dmp_module.diff_match_patch()
diff = dmp.diff_main("Hello World.", "Goodbye World.")
dmp.diff_cleanupSemantic(diff)
print(dmp.diff_prettyHtml(diff))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment