This method is used to convert a list item to an atom.
listvalue − This is the list value which needs to be converted to an atom.
An atom based on the input of the list value.
-module(helloworld). -export([start/0]). start() -> io:fwrite("~p~n",[list_to_atom("atom1")]).
The output of the above program is as follows.