How can I compare two dictionaries of different keys, such as the ones below?
dictionary={"name":"abc","age":23,"male":True}
new_dictionary={"my_name":"abc","my_age":23,"male":1}
When the two dictionaries in the example are compared, the comparison should return true.
Or if you are just interested in ensuring that the values are the same without any key checking:
edit: As Tadeck pointed out in comments,
sorted()is safer to use here thanset().(Yes, this works even though one dictionary has
1and the other hasTrue)