Why does Julia think a vector is a string?

What do you mean by “the vector has spaces”? Whether or not there are spaces is just a printing/display issue, the underlying vectors are the same irrespective of the whitespace between elements:

julia> [1, 2, 3] == [1,2,3] == [1  ,   2   ,   3]
true
2 Likes