# How to append to arrays in a dictionary one by one?

**URL:** https://discourse.julialang.org/t/how-to-append-to-arrays-in-a-dictionary-one-by-one/12818
**Category:** General Usage
**Tags:** question, array, dictionary, loops
**Created:** [August 2, 2018, 10:33am UTC](https://discourse.julialang.org/t/how-to-append-to-arrays-in-a-dictionary-one-by-one/12818 "2018-08-02T10:33:51Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [August 2, 2018, 10:39am UTC](https://discourse.julialang.org/t/how-to-append-to-arrays-in-a-dictionary-one-by-one/12818/2 "2018-08-02T10:39:06Z")

</div>

> [@wei](#):
>
> entryvalues = fill(Float64,size(entries))

This fills a vector with the _same_ empty vector of `Float64`. If you want them all to be separate you can change this to

```julia
entryvalues = [Float64[] for _ in 1:length(entries)]

```

See also [PSA: how to quote code with backticks](https://discourse.julialang.org/t/psa-how-to-quote-code-with-backticks/7530) for formatting your code.

---

_[View the full topic](https://discourse.julialang.org/t/how-to-append-to-arrays-in-a-dictionary-one-by-one/12818)._
