cmp(a, b) returns more information than a==b, since it will return either 1 for a > b, 0 for a == b, or -1 for a < b while a==b returns a simple True/False.
cmp(1,2) returns -1
cmp(2,2) returns 0
cmp(2,1) returns 1
For lists, python compares each indice one by one until one pair is inequal or one of the lists runs out of indices.
cmp( [1, 1, 2], [1, 2, 0] ) returns -1; cmp( [2, 2], [2, 2, 2] ) returns -1
cmp( [1, 2, 1], [1 ,2, 1] ) returns 0
cmp( [1, 3, 1], [1, 1, 3] ) returns 1; cmp( [1], [0, 100, 100] ) returns 1; cmp( [1, 0, 0], [1] ) returns 1
So while you can use cmp(a,b) == 0 in place of a==b (since both will give True for equal, False for unequal) , cmp also gives you the ability to see which is larger.
---
Summary: cmp( a, b) == 0 will always give the same answer as a == b, but cmp(a,b) itself can give more information.