Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 957 Bytes

add-and-retrieve-todo.md

File metadata and controls

31 lines (19 loc) · 957 Bytes

Add and retrieve todo

In this story we call the Python API to add "buy bread" to the to do list and then and then see that bread is on the list.

import todo

print("Adding an item")
todo.add_item("buy bread")

print()
print("List items:")
todo.list_items()

Will output:

Adding an item                                                                                                                                                  
To do added buy bread                                                                                                                                           
                                                                                                                                                                
List items:                                                                                                                                                     
buy bread