{ 执行下列代码后的输出结果是()。 >;>;>; a=[1,2,3] >;>;>; b=[1,2,3] >;>;>; list(map(lambda x,y:str(x+y),a,b)) }(1.0)
A: ['2', '4', '6']
B: [2, 4, 6]
C: ['11', '22', '33']
D: [11, 22, 33]
A: ['2', '4', '6']
B: [2, 4, 6]
C: ['11', '22', '33']
D: [11, 22, 33]
举一反三
- 下列程序的输出结果是?a = [1, 2, 3]print a * 2 A: [2, 4, 6] B: [1, 2, 3, 1, 2, 3] C: [11, 22, 33] D: 程序出错
- 下列代码运行结果是? a = map(lambda x: x**3, [1, 2, 3]) list(a)
- 已知f=lambda x,y:x+y,则f([4],[1,2,3])的值是( )。 A: [1, 2, 3, 4] B: 10 C: [4, 1, 2, 3] D: {1, 2, 3, 4}
- 下列代码运行结果是?a = map(lambda x: x**3, [1, 2, 3])list(a) A: [1, 12, 27] B: (1, 6, 9) C: [1, 8, 27] D: [1, 6, 9]
- 程序段如下: x=[1,2,3] y=["a","b","c"] print(list(zip(x,y)))print函数输出的结果是( ) A: [( 'a':1), ('b:2), ('c':3)] B: [(1,2,3),("a","b","c")] C: [(1, 'a'), (2, 'b'), (3, 'c')] D: [{1:'a'}, {2:‘b'}, {3:'c'}]