How do I create a list in Julia?

Viewed 236

I thought that a lst could be written as following.
But using the typeof() function one can see that its not a list.

julia> a = [1,"test", π]
       typeof(a)

Vector{Any} (alias for Array{Any, 1})
1 Answers

If you come from Python then what Python calls a list is the same as Vector{Any} in Julia in your example.

However, if you are interested in a linked list data structure instead then you have it in DataStructures.jl package, see here.

Related