Guest User

Untitled

a guest
Jan 21st, 2018
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. class BigBadClass:
  2. def __init__(self):
  3. #this is normally where you get stuff that gets set up when you initialize the class
  4. self.pants = "jorts"
  5.  
  6. def changepants(self, newpants):
  7. # you can change the pants!
  8. self.pants = newpants
  9.  
  10. #initialize the class
  11. pantc = BigBadClass()
  12. print(pantc.pants)
  13. pantc.changepants("bellbottoms")
  14. print(pantc.pants)
Add Comment
Please, Sign In to add comment