单选题 适中
#17784

执行下面Python代码后,输出的结果是?( ) def outer ( ) : n = 0 def inner ( ) : nonlocal n n += 1…

执行下面Python代码后,输出的结果是?( )

def outer():
	n = 0
	
	def inner():
		nonlocal n
		n += 1
		return n

	return inner


f = outer()
print(f(), f(), f())
未登录也能判分,登录后才会记录
答案与解析
正确答案:A
这道题暂未补解析。