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
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