Build a To-Do app
Asked in the loop stage, with two easy follow-ups.
Implement build_todo_app(actions). Each action is a dictionary with type equal to add, toggle, or delete. An add action contains text; toggle and delete actions contain id. Return the remaining tasks in creation order. Each task must have an integer id, its text, and a Boolean completed value. IDs start at 1 and increase for every add action. Ignore toggle or delete actions whose IDs do not exist.
actions is a list of valid action dictionaries. Return a list of task dictionaries.
def build_todo_app(actions):