total function
Sum of the elements of a list.
How to write it
total(list)
- list
- The list. Takes a list.
Examples
total([1, 2, 3])In the solver,
Open in the solvertotal([1, 2, 3])gives6.
Related functions
- union
The elements in any of some lists, each once, in order.
- thread
Apply a function to corresponding elements of lists.
- accumulate
Running totals of a list.
- tally
How often each element occurs: a list of element and count pairs.
- append
A list with an element added at the end.
- take
The first elements of a list.