# Receiving PyObject instead of Sym while appending result of a sympify to an empty list!

**URL:** <https://discourse.julialang.org/t/receiving-pyobject-instead-of-sym-while-appending-result-of-a-sympify-to-an-empty-list/32331>\
**Category:** General Usage\
**Tags:** question, package\
**Created:** [December 16, 2019, 12:17pm UTC](https://discourse.julialang.org/t/receiving-pyobject-instead-of-sym-while-appending-result-of-a-sympify-to-an-empty-list/32331 "2019-12-16T12:17:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![AmirHosein](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amirhosein/32/11856_2.png) [@AmirHosein](https://discourse.julialang.org/u/AmirHosein)\
**Post date:** [December 16, 2019, 12:26pm UTC](https://discourse.julialang.org/t/receiving-pyobject-instead-of-sym-while-appending-result-of-a-sympify-to-an-empty-list/32331/2 "2019-12-16T12:26:55Z")

</div>

I just found another way to turn around this issue which is better than adding and removing an auxiliary element. To define my empty list as a one-dimensional array with entries of type Sym and no entry.

```julia
f=Array{Sym,1}()

```

Now everything works fine without need of an extra step in the algorithm.

```julia
for i in List
       append!(f,sympify(i))
end
diff(f[1],x[1])

```

---

_[View the full topic](https://discourse.julialang.org/t/receiving-pyobject-instead-of-sym-while-appending-result-of-a-sympify-to-an-empty-list/32331)._
