First time here? Check out the FAQ!
answered 2017-11-17 12:54:06 +0100
The following works:
sage: L = [random_matrix(ZZ,5,5) for i in range(1,10)] ; L sage: sum(L)
or directly without creating a list first:
sage: sum(random_matrix(ZZ,5,5) for i in range(1,10))