# byte_array.from_list · Rell standard library · Chromia Docs (concept)

> pure static function from_ list(list: list < integer >): byte_array Create a byte_array from a list of integers. The inverse of byte_array.to_list() . All 

Source: https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/byte_array/from_list/

FUNCTION

# byte\_array.from\_list

```signature
pure static function from_list(list: list<integer>): byte_array
```

Create a `byte_array` from a list of integers.

The inverse of `byte_array.to_list()`.

All integers in the passed list are treated as single-byte values, i.e. they must be in the range
`0 <= x < 256`, and therefore the returned `byte_array` will be equal in size to the passed list.

**Parameters**

* **list** — the list of integers

**Throws**

* `exception` — if any element in the list is less than zero or greater than 255

Since 0.9.0

[View this page on docs.chromia.com](https://docs.chromia.com/pages/rell-stdlib/-rell%20-system%20-library/%5Broot%5D/byte_array/from_list.html)Generated API reference, mirrored from the live docs
