Skip to content

Instantly share code, notes, and snippets.

@archangelic
Created January 11, 2018 22:32
Show Gist options
  • Save archangelic/af6ba38712b4a1add85001ff1950c690 to your computer and use it in GitHub Desktop.
Save archangelic/af6ba38712b4a1add85001ff1950c690 to your computer and use it in GitHub Desktop.
class BigBadClass:
def __init__(self):
#this is normally where you get stuff that gets set up when you initialize the class
self.pants = "jorts"
def changepants(self, newpants):
# you can change the pants!
self.pants = newpants
#initialize the class
pantc = BigBadClass()
print(pantc.pants)
pantc.changepants("bellbottoms")
print(pantc.pants)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment