EasyOutput prediction
Logging decorator output
What does this code print?
def log_call(func):
def wrapper(*args, **kwargs):
print("calling", func.__name__)
return func(*args, **kwargs)
return wrapper
@log_call
def square(n):
return n * n
result = square(5)
print(result)← → arrow keys to navigate
Sign in to save your progress.