Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 358 Bytes

colored_diffs.rst

File metadata and controls

11 lines (8 loc) · 358 Bytes

Colored diffs

One practical use of colors is to make differences in text more visible. ansicolor.colordiff computes a diff of two strings and returns a marked-up version of them that highlights the characters that differ between the two.

../snippets/colored_diffs_1.py