Advertisement
chrisCNG

myHaiku

Feb 22nd, 2019
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. # My Haiku
  2. #Create an initial list
  3. myHaiku = ["Sunny in our garden","The daffodils are coming","Spring!",""]
  4. #Define a new function display_haiku
  5. def display_haiku():
  6.   for item in myHaiku:
  7.     print(item)
  8. display_haiku()
  9. # Add item to the list
  10. myHaiku.append("by Chris Garrard")
  11.  
  12. #Display updated list
  13. display_haiku()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement