Python - Class Methods and Static Methods
What will be the output of this code?
class Example:
count = 0
def __init__(self):
Example.count += 1
@classmethod
def get_count(cls):
return cls.count
obj1 = Example()
obj2 = Example()
print(Example.get_count())