What is the difference between a dictionary and a defaultdict in Python?
A dictionary is a collection of key-value pairs, where each key is unique. It is defined using curly braces ({}) or the dict() function. A defaultdict is a subclass of dictionary that provides a default value for missing keys. It is defined using the defaultdict() function from the collections module and simplifies handling missing keys.