Ask Your Question

Revision history [back]

The command

S = [sum(a*b for (a,b) in zip(List, v)) for v in ListofVectors]

will return what you want, although it won't be printed how you want:

sage: S
[3-form on the 4-dimensional differentiable manifold U,
 3-form on the 4-dimensional differentiable manifold U,
 3-form on the 4-dimensional differentiable manifold U]
sage: S[0] == g + h
True
sage: S[1] == 2*g + h
True