14 lines
291 B
Python
14 lines
291 B
Python
class Hotdog:
|
|
count: float = 0
|
|
def __init__(self) -> None:
|
|
Hotdog.count += 1
|
|
|
|
@staticmethod
|
|
def get_count() -> int:
|
|
return Hotdog.count
|
|
|
|
if __name__ == '__main__':
|
|
h1 = Hotdog()
|
|
print(Hotdog.get_count())
|
|
h2 = Hotdog()
|
|
print(Hotdog.get_count()) |