已知 vec=[[1,2],[3,4]],则表达式[[row[i] for row in vec] for i in range(len(vec[0]))]的值为( )[/i]
举一反三
- 已知 vec = [[1,2], [3,4]],则表达式 [[row[i] for row in vec] for i in range(len(vec[0]))]的值为______________()_________。[/i] A: [1, 2, 3, 4] B: [[1, 2, 3], 4] C: [[1, 3], [2, 4]] D: [1, 2, [3, 4]]
- 已知x=[[1,2,3],[4,5,6]],表达式[[row[i] for row in x] for i in range(len(x[0]))]的值为(______ )。[/i]
- 已知列表m=[[1,2],[3,4]],有列表a=[[row[i] for row in m] for i in range(2)],则a[0][1]是[/i]
- 已知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]
- 已知x = [[] for i in range(3)],那么执行语句x[0].append(1)之后,x的值为_________________。