下面代码的输出结果是 ls1 = [1,2,3] ls2 = [4,5,6] print(ls1+ls2)
A: [4,5,6]
B: [1, 2, 3, 4, 5, 6]
C: [1,2,3]
D: [5,7,9]
A: [4,5,6]
B: [1, 2, 3, 4, 5, 6]
C: [1,2,3]
D: [5,7,9]
举一反三
- 二维列表ls=[[1,2,3],[4,5,6],[7,8,9]],下列哪个选项能获取其中元素5? A: ls[1][1] B: ls[-1][-1] C: ls[4] D: ls[-2][-1]
- 以下程序的输出结果是: frame = [[1,2,3],[4,5,6],[7,8,9]] rgb = frame[::-1] print(rgb) A: [[7, 8, 9]] B: [[1,2,3],[4,5,6],[7,8,9]] C: [[7, 8, 9], [4, 5, 6], [1, 2, 3]] D: [[1, 2, 3], [4, 5, 6]]
- 以下程序的输出结果是:( )。frame = [[1,2,3],[4,5,6],[7,8,9]]rgb = frame[::-1]print(rgb) A: [[1,2,3],[4,5,6],[7,8,9]] B: [[1, 2, 3], [4, 5, 6]] C: [[7, 8, 9], [4, 5, 6], [1, 2, 3]] D: [[7, 8, 9]]
- python编程语言中,二维列表ls=[[1,2,3], [4,5,6],[7,8,9]],哪个选项能获取其中元素5? A: ls[-1][-1] B: ls[4] C: ls[1][1] D: ls[-2][-1]
- 以下程序的输出结果是:<br/>frame<br/>= [[1,2,3],[4,5,6],[7,8,9]]; rgb<br/>= frame[::-1]; print(rgb) A: [[7, 8, 9], [4, 5, 6], [1, 2, 3]] B: [[1, 2, 3], [4, 5, 6]] C: [[7, 8, 9]] D: [[1,2,3],[4,5,6],[7,8,9]]