Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class Animal:
"""Animal class"""
animal = 'dog'
@classmethod
def change_animal(cls, new_animal):
"""Change animal for class"""
return cls.animal = new_animal
def print_animal(self):
"""Return animal"""
return self.animal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.