1 | initial version |

sage: L= [(1,2,3), (1/2, 4, 5), (-1, 0, 0)] sage: sum(vector(v) for v in L) (1/2, 6, 8)

2 | No.2 Revision |

When you type:

```
sage: (1,2,3)
(1, 2, 3)
```

You get a tuple, not a vector:

```
sage: type((1,2,3))
<type 'tuple'>
```

For tuple, the sum is the concatenation:

```
sage: (1,2,3)+(1/2, 4, 5)
(1, 2, 3, 1/2, 4, 5)
```

So to sum them as vectors, you have fist to transform them into vectors, as follows:

```
sage: L= [(1,2,3), (1/2, 4, 5), (-1, 0, 0)]
sage: sum(vector(v) for v in L)
(1/2, 6,
```~~8)~~8)

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.