Order of Nested For Clauses
matrix = [[1, 2], [3, 4], [5, 6]]
flat = [x for row in matrix for x in row]
Which ordinary nested for loop is this comprehension equivalent to?
Sign in to answer questions and track your progress
Sign Inmatrix = [[1, 2], [3, 4], [5, 6]]
flat = [x for row in matrix for x in row]
Which ordinary nested for loop is this comprehension equivalent to?
Sign in to answer questions and track your progress
Sign In