21
Loading subject content…
Loading subject content…
Loading practice questions…
What is the output of the following code?
def greet(name: str) -> str:
return 'Hi ' + name
print(greet.__annotations__['return'].__name__)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())What is the output of the following code?
def info(**kw):
return sorted(kw)
print(info(b=1, a=2))