Compares two list and returns how they have changed. Each function internally uses Wu's O(NP) algorithm.
Compares general lists.
diff [ 1, 3 ] [ 2, 3 ]
--> [ Removed 1, Added 2, NoChange 3 ]Compares two text. Considers two lines similar if they are equivalent ignoring spaces.
Giving the following text
a =
"""aaa
bbb
ddd"""
b =
"""zzz
aaa
ccc
ddd"""results in
[ Added "zzz"
, NoChange "aaa"
, Removed "bbb"
, Added "ccc"
, NoChange "ddd"
].
This describes how each line has changed and also contains its value.