from datetime import datetime
Given dictionary
names_to_birthdays = {
}
Initialize a list to store names starting with ‘A’
a_names =
Iterate over the dictionary keys
for name in names_to_birthdays.keys():
if name.startswith(‘A’):
a_names.append(name)
Print the names starting with ‘A’
print(“Names starting with ‘A’:”, a_names)