已知bb= [[1,2,3],[4,5,6],[7,8,9]],则表达式 [row[col] for row in bb for col in range(len(row)) if col==1 ] 的值为________。()
A: [2, 5, 8]
B: [1,4,7]
C: [1,2,3]
D: [3,6,9]
A: [2, 5, 8]
B: [1,4,7]
C: [1,2,3]
D: [3,6,9]
举一反三
- 如果 frame = [[1,2,3],[4,5,6],[7,8,9]],则rgb = frame[::-1]的值是: 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: [[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]]
- 以下程序的输出结果是:<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]]
- 以下程序的输出结果是( )。 frame<br/>= [[1,2,3],[4,5,6],[7,8,9]] rgb<br/>= frame[: : -1] print(rgb) A: [[1,<br/>2, 3], [4, 5, 6]] B: [[7,<br/>8, 9], [4, 5, 6], [1, 2, 3]] C: [[1,2,3],[4,5,6],[7,8,9]] D: [[7,<br/>8, 9]]