English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Erlang Tuple list_to_tuple Method

Erlang Tuple

This method is to convert a list to a tuple.

Syntax

list_to_tuple(list)

Parameter

  • list −This is the list that needs to be converted to a tuple.

Return Value

Returns a tuple based on the provided list.

-module(helloworld). 
-export([start/0]). 
start() -> 
   io:fwrite("~w",[list_to_tuple([1,2,3]]).

Output Result

The output of the above program is as follows

{1,2,3}

Erlang Tuple