Hi all!!!
I have some problems with List comprehension in Python.
How can I obtain these two nested list using comprehension?
list1 = [[1,2,3],[4,5,6],[7,8,9]]
list2 = [[1,0,0],[0,1,0],[0,0,1]] (identity matrix)
where list1 and list2 are square matrix of 'n' size
thank you in advance!!!