iex> num = [9]
'\t'分配一个9的列表返回'\t‘。这是什么原因?
发布于 2016-03-23 17:09:22
有关数据类型的更多信息,可以使用i helper in IEx:
iex> i [9]
Term
'\t'
Data type
List
Description
This is a list of integers that is printed as a sequence of characters
delimited by single quotes because all the integers in it represent valid
ASCII characters. Conventionally, such lists of integers are referred to as
"char lists" (more precisely, a char list is a list of Unicode codepoints,
and ASCII is a subset of Unicode).
Raw representation
[9]
Reference modules
List如果要检查原始表示形式,可以将char_lists: false传递给inspect
IO.inspect('abc', char_lists: false)
[97, 98, 99]https://stackoverflow.com/questions/36184453
复制相似问题