compare dict python code example
Example 1: difference between dictionary and sets in python
# Set: A Set is an unordered collection data type that is iterable, mutable and has no duplicate elements. ... Dictionary: in Python is an unordered collection of data values, used to store data values like a map, which unlike other Data Types that hold only single value as an element, Dictionary holds key:value pair.
Example 2: python check if two dictionaries have same keys
d_1.keys() == d_2.keys()