def save_date(name, comment, date_time):
database = shelve.open(file)
if 'greet_list' not in database:
greet_list = []
else:
greet_list = database['greet_list']
greet_list.insert(0, {'name': name,
'comment': comment,
'date_time': date_time})
database['greet_list'] = greet_list
database.close()