Python - Class Methods and Static Methods
Consider this code:
What will be the output?
class Logger:
level = "INFO"
@classmethod
def set_level(cls, level):
cls.level = level
@classmethod
def log(cls, message):
print(f"[{cls.level}] {message}")
Logger.log("Start")
Logger.set_level("DEBUG")
Logger.log("Debugging")What will be the output?
