# What is the difference between copy() and deepcopy()?

**URL:** <https://discourse.julialang.org/t/what-is-the-difference-between-copy-and-deepcopy/3918>\
**Category:** General Usage\
**Tags:** deepcopy\
**Created:** [May 25, 2017, 3:06am UTC](https://discourse.julialang.org/t/what-is-the-difference-between-copy-and-deepcopy/3918 "2017-05-25T03:06:41Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [May 25, 2017, 4:44am UTC](https://discourse.julialang.org/t/what-is-the-difference-between-copy-and-deepcopy/3918/2 "2017-05-25T04:44:39Z")

</div>

None of the operations above are copies, they are assignments. For understanding the difference between `copy` and `deepcopy`, consider

```julia
A1 = [[1]]
A2 = copy(A1)
A1[1] === A2[1] # true
A3 = deepcopy(A1)
A1[1] === A3[1] # false

```

---

_[View the full topic](https://discourse.julialang.org/t/what-is-the-difference-between-copy-and-deepcopy/3918)._
