Here is what the above code is Doing:
1. We create a dictionary called dates_dict.
2. We loop through the list of dates.
3. We create a key for each date by using the date’s year and month.
4. We add the date to the list of dates for that key.