# Create dictionary in Python, how?

**URL:** <https://forum.dynamobim.com/t/create-dictionary-in-python-how/59712>\
**Category:** Developers\
**Created:** [January 25, 2021, 6:37pm UTC](https://forum.dynamobim.com/t/create-dictionary-in-python-how/59712 "2021-01-25T18:37:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Draxl\_Andreas](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/draxl_andreas/32/145744_2.png) [@Draxl\_Andreas](https://forum.dynamobim.com/u/Draxl_Andreas)\
**Post date:** [January 25, 2021, 6:37pm UTC](https://forum.dynamobim.com/t/create-dictionary-in-python-how/59712/1 "2021-01-25T18:37:12Z")

</div>

Hello Dynos and Pythons,

actully i have a task that i already solved perfectly: so i placed symbols based on values

 ![2021-01-25_19h19_33](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/7/a7d13b2f7bb4fbe21bf500d950ae9a92da33529b.png)  
 ![2021-01-25_19h19_24](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/d/2de78190dc8a12e3ce4fe37e9765e4426aeffa08.png)

how can I sove this via python, i mean using less nodes! a startpoint is to make a dictionary:

```
x = {"Gelb" : IN[0], "Blau" : IN[1], "Rot" : IN[2]}
OUT = x

```

I want to integrade in one code as much nodes as i can  
i am glad about any insperation and steps!

f.e. call familytype in the pythonCode, or get alle elements of category and locationPoint.

KR

Andreas

[Projekt\_.rvt](https://forum.dynamobim.com/uploads/short-url/eEkgdcS862DzzD4fri1MuoPGvvm.rvt) (1.2 MB)

---

<div class="post-metadata">

**Author:** ![\_Vijay](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/_vijay/32/91307_2.png) [@\_Vijay](https://forum.dynamobim.com/u/_Vijay)\
**Post date:** [January 25, 2021, 7:33pm UTC](https://forum.dynamobim.com/t/create-dictionary-in-python-how/59712/2 "2021-01-25T19:33:45Z")

</div>

See if that helps

> [@Working with Dictionaries in Python](https://forum.dynamobim.com/t/working-with-dictionaries-in-python/43440/7):
>
> Hello, since Dynamo 2.3 the Dynamo wrapper convert automatically a Python dictionary to a Net dictionary Before this version (like version 2.0.4) it is advisable to convert a Python dictionary to Net only if the dictionary is assigned to the variable OUT (and the key must be a string). Inside the node we can write and edit a Python dictionary without problems
