
此方法是将列表转换为元组。
语法
list_to_tuple(list)
参数
- list −这是需要转换为元组的列表。 
返回值
根据提供的列表返回一个元组。
-module(helloworld). 
-export([start/0]). 
start() -> 
   io:fwrite("~w",[list_to_tuple([1,2,3])]).输出结果
上面程序的输出如下
{1,2,3}
                    
                
此方法是将列表转换为元组。
list_to_tuple(list)
list −这是需要转换为元组的列表。
根据提供的列表返回一个元组。
-module(helloworld). 
-export([start/0]). 
start() -> 
   io:fwrite("~w",[list_to_tuple([1,2,3])]).输出结果
上面程序的输出如下
{1,2,3}