FILEPATH = "todos.txt" def get_todos(filepath: object = FILEPATH): """ Read a text file and return the list of t0-do items """ with open(filepath, "r") as file_local: todos_local = file_local.readlines() return todos_local def write_todos(todos_arg, filepath=FILEPATH): """ Write the to-do items list in the text file.""" with open(filepath, "w") as file: file.writelines(todos_arg)