l1=[1,2,3,4,5,6,7,8,9]l1.append(['c','d',['adfas']])print(l1)输出:
举一反三
- 以下程序的输出结果是: 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]]
- 给定多维数组arr:arr =[[1 2 3] [4 5 6] [7 8 9]],可以得到[[5 6] [8 9]]的操作是 A: arr[1:2,1:2] B: arr[1:3,1:3] C: arr[1:,1:] D: arr[:,:]
- A=[1,2,3;4:6;7:9]; C=[A;[10,11,12]], D=C(1:3,[2 3]) E=C(2,[1 2]) E=(__________________)