# total 関数

リストの要素の総和。

## 書き方

### total(list)

**list**

リスト。リストを受け取ります。

## 例題

- $\displaystyle \operatorname{total}(\left[ 1, 2, 3 \right]) = 6$

  `total([1, 2, 3])`

  ソルバーでは、`total([1, 2, 3])` の答えは `6` です。

  [ソルバーで開く](https://ja.hilberon.com/?q=total%28%5B1%2C%202%2C%203%5D%29)

## 関連する関数

- [union](https://ja.hilberon.com/library/union)

  いずれかのリストに含まれる要素を、重複を除いて順に並べたもの。
- [thread](https://ja.hilberon.com/library/thread)

  リストの対応する要素に関数を適用します。
- [accumulate](https://ja.hilberon.com/library/accumulate)

  リストの累積和。
- [tally](https://ja.hilberon.com/library/tally)

  各要素が何回現れるか。要素と個数の組のリスト。
- [append](https://ja.hilberon.com/library/append)

  末尾に要素を追加したリスト。
- [take](https://ja.hilberon.com/library/take)

  リストの先頭の要素。

---
Source: https://ja.hilberon.com/library/total
