Question: I have a list of dictionaries

```
d = [{"Date": "2020/10/03 3:30", "Name": "John"}, {"Date": "2020/10/03 5:15", "Name": "Harry"}, {"Date": "2020/10/05 6:30", "Name": "Rob"}]

```

and I want to only print the name with the same dates.

```
Output:
John
Harry

```

I am not sure how I can implement this, any tips ?

Answer: 
Your problem can easily be solved by traversing the list of entries and collecting the dates with the names in a new dictionary. So, you use the dates as key for a dictionary and add the names in a corresponding list of that date. I'm adding a code snippet that does that fairly easily:

```
d = [{"Date": "2020/10/03 3:30", "Name": "John"}, {"Date": "2020/10/03 5:15","Name": "Harry"}, {"Date": "2020/10/05 6:30", "Name": "Rob"}]

dates = {}

for entry in d:
    date = entry["Date"].split()[0]
        if date in dates:
            dates[date].append(entry["Name"])
        else:
            dates[date] = []
            dates[date].append(entry["Name"])

print(dates["2020/10/03"])
print(dates["2020/10/05"])

```

Yes, I know my code snippet doesn't directly provide your specified output. I kept it open ended so you can tailor it towards your specific needs.
Assuming the `"Date"` format is consistent, you can use simple dict & list comprehensions:

```
from collections import defaultdict

res = defaultdict(list)

for i in d:
    dt = i["Date"].split()[0]
    res[dt].append(i["Name"])

for date, names in res.items():
    if len(names) > 1:
        print(*names, sep="\n")

```