Lists not displaying correctly (slashes in numbers)

I saw the output below in my iex terminal. Can anyone explain the slashes and how to remove them? I am trying to add numbers into a list and I get slashes.
iex(115)> [200,10]
[200, 10]
iex(116)> [20]
[20]
iex(117)> [9]
‘\t’
iex(118)> [9, 20]
[9, 20]
iex(119)> [9, 9, 9]
‘\t\t\t’

Hello and welcome,

You have just met the first Elixir test, don’t worry, everyone had to pass this hurdle.

[9] and ’ \t’ are strictly equivalent.

One is a list of numbers, one is a charlist, or list of char… and code 9 is equal to \t.

iex> [65, 66, 67]
'ABC'
iex> [65, 66, 67] == 'ABC'
true

You are now allowed to wear an Elixir yellow belt :slight_smile:

5 Likes

Here’s the official documentation for what you’re seeing:

https://hexdocs.pm/elixir/List.html#module-charlists

4 Likes