def add_task(date, description): tasks[date].append(description) serialize_tasks(tasks)
def read_tasks(): try: tasks = deserialize_tasks() except IOError: serialize_tasks(tasks) return read_tasks()