2023-04-06 17:03:21 -07:00
|
|
|
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())
|