The following codes run under Julia v1.6.1 and DataStructures v0.17.20.
How to access values by using keys
Creating a dictionary with String keys:
julia> dict = Dict(“A” => 1, “B” => 2, “C” => 3)
Dict{String, Int64} with 3 entries: “B” => 2 “A” => 1 “C” => 3 julia> dict[“A”]
1
Creating a dictionary with Symbols:
I learned it from the post of <a href=“https://www.geeksforgeeks.org/julia-dictionary/" target=”_blank” …