11
Loading subject content…
Loading subject content…
Loading practice questions…
What is the output of the following code?
def f(**kw):
return sorted(kw)
print(f(b=2, a=1))What is the output of the following code?
def fact(n):
return 1 if n <= 1 else n * fact(n - 1)
print(fact(5))What is the output of the following code?
def outer():
count = 0
def inner():
nonlocal count
count += 1
return count
return inner
c = outer()
c()
print(c())