For example, let\'s say I have to dictionaries:
d_1 = {\'peter\': 1, \'adam\': 2, \'david\': 3}
and
d_2 = {\'peter\': 14, \
You can get the keys for a dictionary with dict.keys().
dict.keys()
You can turn this into a set with set(dict.keys())
set(dict.keys())
You can compare sets with ==
==
To sum up:
set(d_1.keys()) == set(d_2.keys())
will give you what you want.