已知t函数定义如下,下列会输出True的语句是t = lambda x, y, z=0: x + y > z
A: print(t(1, 2))
B: print(t(1, 2, 3))
C: print(t(1))
D: print(t(1, 2, 0))
A: print(t(1, 2))
B: print(t(1, 2, 3))
C: print(t(1))
D: print(t(1, 2, 0))
举一反三
- 下列程序的输出结果是:x = 1 y = 2 def swap(a, b): t = a a = b b = t print a, b swap(x, y) print x, y A: 1 21 2 B: 2 11 2 C: 1 22 1 D: 2 12 1
- 运行如下程序,输出结果是 。 try: x, y = 1, 0 z = x / y print(0, end=",") except: print("1", end=",") else: print("2", end=",") finally: print("3", end=",")
- def fun(x,y): global x,y t=x x=y y=t x=0 y=1 fun(x,y) print(x,y) 结果是 1 0
- declare @x int,@y int,@t int set @x=1 set @y=2 begin set @t=@x set @x=@y set @y=@t end print @x
- 已知t=(12,1.5,[True,3+5j]),则下列选项中,执行时不会报错的语句包括( )。 A: t[2]=1 B: t[2:]=1 C: t[2][1]='test' D: print(t[2])