For example, let\'s say I have to dictionaries:
d_1 = {\'peter\': 1, \'adam\': 2, \'david\': 3}
and
d_2 = {\'peter\': 14, \
In Python2,
set(d_1) == set(d_2)
In Python3, you can do this which may be a tiny bit more efficient than creating sets
d1.keys() == d2.keys()
although the Python2 way would work too