Created
October 17, 2018 15:42
-
-
Save JackInTaiwan/c2da0fb1d4c33344db7680c0ce9c2bd5 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 Shiba: | |
pee_length = 10 | |
def __init__(self, height, weight): | |
self.height = height | |
self.weight = weight | |
@classmethod | |
def pee(cls): | |
print("pee" + "." * cls.pee_length) | |
Shiba.pee() | |
#result: pee.......... | |
black_shiba = Shiba(30, 40) | |
black_shiba.pee() | |
#result: pee.......... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment