# How to extend a vector the Julian way

**URL:** https://discourse.julialang.org/t/how-to-extend-a-vector-the-julian-way/41351
**Category:** New to Julia
**Created:** [June 14, 2020, 2:58am UTC](https://discourse.julialang.org/t/how-to-extend-a-vector-the-julian-way/41351 "2020-06-14T02:58:31Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![erlebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/erlebach/32/12973_2.png) [@erlebach](https://discourse.julialang.org/u/erlebach)
#### Post date: [June 14, 2020, 2:58am UTC](https://discourse.julialang.org/t/how-to-extend-a-vector-the-julian-way/41351/1 "2020-06-14T02:58:31Z")

</div>

In Python, given a list `a=[1,2]`, I can extend it with

```julia
a.extend([3,4])

```

Now a contains `[1,2,3,4]`. Does Julia have a simple way to extend vectors? Of course, `vcat` comes to mind:

```julia
a = [1,2]
a = vcat(a,[3,4])

```

Are there better approaches?

---

<div class="post-metadata">

### Author: ![tbeason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbeason/32/15898_2.png) [@tbeason](https://discourse.julialang.org/u/tbeason)
#### Post date: [June 14, 2020, 3:06am UTC](https://discourse.julialang.org/t/how-to-extend-a-vector-the-julian-way/41351/2 "2020-06-14T03:06:04Z")

</div>

Yes, many. See `push!`, `pushfirst!`, `append!` for starters.
