写出下面代码的运行结果( )def exchange(...nge(x,y)print((x,y))
举一反三
- 写出下面代码的运行结果( )def f(x,y=[])...) print(y)f(2)
- 写出下面代码的运行结果( )def exchange(a,b): return (b,a)x = 10y = 20x,y = exchange(x,y)print((x,y)) A: 10 20 B: 20 10 C: (20, 10) D: (10, 20)
- 写出下面代码的运行结果( )def f(x,y=[]): ...(i*i) print(y)f(2)
- 中国大学MOOC: 写出下面代码的运行结果( )def f(x,y=[]): for i in range(x): y.append(i*i) print(y)f(2)
- 中国大学MOOC: 下面代码的输出结果是def exchange(a,b): a,b = b,a return (a,b)x = 10y = 20x,y = exchange(x,y)print(x,y)