# A way to create large dictionary? "ERROR: LoadError: syntax: expression too large"

**URL:** <https://discourse.julialang.org/t/a-way-to-create-large-dictionary-error-loaderror-syntax-expression-too-large/37247>\
**Category:** New to Julia\
**Tags:** question, jump\
**Created:** [April 8, 2020, 9:55pm UTC](https://discourse.julialang.org/t/a-way-to-create-large-dictionary-error-loaderror-syntax-expression-too-large/37247 "2020-04-08T21:55:33Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![ccoffrin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ccoffrin/32/400_2.png) [@ccoffrin](https://discourse.julialang.org/u/ccoffrin)\
**Post date:** [April 9, 2020, 1:03am UTC](https://discourse.julialang.org/t/a-way-to-create-large-dictionary-error-loaderror-syntax-expression-too-large/37247/3 "2020-04-09T01:03:16Z")

</div>

I believe the issue is that you are making the whole dictionary as a comprehension. Did you try something like,

```julia
pDemand = Dict( (:DEM_ELC_DH, :ELC, :AL, :2018, :d001_h00) => 20.4280246 )
pDemand[(:DEM_ELC_DH, :ELC, :AR, :2018, :d001_h00)] = 9.4801576
pDemand[(:DEM_ELC_DH, :ELC, :AZ, :2018, :d001_h00)] = 12.5974967
…

```

---

_[View the full topic](https://discourse.julialang.org/t/a-way-to-create-large-dictionary-error-loaderror-syntax-expression-too-large/37247)._
