list_2 = [{'unique_id': '001', 'key1': 'AAA', 'key2': 'DDD', 'key3': 'EEE'},
    {'unique_id': '002', 'key1': 'AAA', 'key2': 'CCC', 'key3': 'FFF'}]
list_3 = [{'Name': 'Abid', 'Age': 27}, {'Name': 'Mahnaz', 'Age': 27}]
list_4 = [{'Name': 'Abid', 'Age': 27}, {'Name': 'Mahnaz', 'Age': 27}]
print(cmp(list_1, list_1))
print(cmp(list_1, list_3))
print(cmp(list_1, list_2))
print(cmp(list_2, list_1))
print(cmp(list_3, list_4))
Comparing 2 lists consisting of dictionaries with unique keys in python