Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.56 KB | None | 0 0
  1. class Song(object):
  2.    
  3.     def __init__(self,lyrics):
  4.         self.lyrics = lyrics
  5.        
  6.        
  7.     def sing_me_a_song(self):
  8.         for line in self.lyrics:
  9.             print(line)
  10.    
  11. happy_bday = Song(["Happy birthday to you",
  12.                    "I don't want to get sued",
  13.                    "So I'll stop right there"])
  14.                    
  15. bulls_on_parade = Song(["They rally around tha family",
  16.                         "With pockets full of shells"])
  17.                        
  18. happy_bday.sing_me_a_song()
  19.  
  20. bulls_on_parade.sing_me_a_song()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement