11
What is the output of the following code?
print([(i, j) for i in range(2) for j in range(2) if i != j])DiscussEasy
Loading subject content…
Loading practice questions…
What is the output of the following code?
print([(i, j) for i in range(2) for j in range(2) if i != j])What is the output of the following code?
matrix = [[1, 2], [3, 4]]
print([row[i] for i in range(2) for row in matrix])What is the output of the following code?
print([(x, y) for x in range(2) for y in range(2) if x != y])