daily pastebin goal
23%
SHARE
TWEET

myHaiku

chrisCNG Feb 22nd, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top