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