Last active
August 18, 2017 11:39
-
-
Save pallavg55/ef33243739d86ef224369a7090b5099d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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