First time here? Check out the FAQ!
answered 7 years ago
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))