17 lines
303 B
Python
17 lines
303 B
Python
class Test:
|
|
hotdogs = 0
|
|
def __init__(self):
|
|
self.hotdogs = 1
|
|
def more(self):
|
|
self.hotdogs += 1
|
|
def __str__(self):
|
|
return "🌭" * self.hotdogs
|
|
|
|
|
|
test1 = Test()
|
|
test2 = Test()
|
|
print(f"test1: {test1}")
|
|
test1.more()
|
|
print(f"test1: {test1}")
|
|
print(f"test2: {test2}")
|