English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
This method is used to convert an existing list to a binary list.
list_to_binary(lst)
Lst −This is the list that needs to be converted to a binary value.
Return the bit string of the list.
-module(helloworld). -export([start/0]). start() -> io:fwrite("~p~n",[list_to_binary([1,2,3)]).
When we run the above program, we will get the following results.
<<1,2,3>>