What will the following list comprehension output?
matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
flattened = [num for row in matrix for num in row]
[[1, 2, 3], [4, 5, 6], [7, 8, 9]]
[1, 2, 3, 4, 5, 6, 7, 8, 9]
[(1, 2, 3), (4, 5, 6), (7, 8, 9)]
[[1], [2], [3], [4], [5], [6], [7], [8], [9]]
This question is part of this quiz :
Python List Comprehension Quiz