In python I could easily generate a dictionary from a list of tuples 

For example

>>> t = ((1, 'a'),(2, 'b'))
>>> dict((y, x) for x, y in t)
{'a': 1, 'b': 2}


Is is possible to do something similar in Julia?

I tried the map function but it gave me errors
julia> Dict(map(k->(k[2],k[1]),t))

no method Dict{K,V}(Array{Any,1},)
at In[100]:1



Reply via email to