# How to run it repetitive?

**URL:** <https://forum.dynamobim.com/t/how-to-run-it-repetitive/53700>\
**Category:** Developers\
**Created:** [August 4, 2020, 9:46am UTC](https://forum.dynamobim.com/t/how-to-run-it-repetitive/53700 "2020-08-04T09:46:11Z")\
**Posts on this page:** 10\
**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:** [August 4, 2020, 9:46am UTC](https://forum.dynamobim.com/t/how-to-run-it-repetitive/53700/1 "2020-08-04T09:46:11Z")

</div>

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/d/9d90a68a7dffbcee7dde9b3110169f52160aa817.png)  
Hello,

How can i make it repetive like “hip,hip,hurra” need i a empty list to append my strings?

```
for hurra_counter in range(1,4):
    for hip_counter in range(1,3):
	    OUT = "Hip"
    OUT = "Hurra !"
```

---

<div class="post-metadata">

**Author:** ![maciek.glowka](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/maciek.glowka/32/70695_2.png) [@maciek.glowka](https://forum.dynamobim.com/u/maciek.glowka)\
**Post date:** [August 4, 2020, 10:12am UTC](https://forum.dynamobim.com/t/how-to-run-it-repetitive/53700/2 "2020-08-04T10:12:27Z")

</div>

hi,

yes, you have to create a list before all the loops and then append strings to it.

---

<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:** [August 4, 2020, 10:53am UTC](https://forum.dynamobim.com/t/how-to-run-it-repetitive/53700/3 "2020-08-04T10:53:07Z")

</div>

```
x = []
a = []

for hurra_count in range(1,4):
    for hip_count in range(1,3):
	    OUT = "Hip"
	z = a.append(hip_count)
    OUT = "Hurra !"
    y = x.append(hurra_count)

    OUT = x,a

```

it is pit off,… 😕

![2020-08-04_12h51_05](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/b/db8dc4c910a33cd9d7943c5e11a2cf4f4c4d2e7e.png)

---

<div class="post-metadata">

**Author:** ![Alien](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alien/32/40701_2.png) [@Alien](https://forum.dynamobim.com/u/Alien)\
**Post date:** [August 4, 2020, 12:31pm UTC](https://forum.dynamobim.com/t/how-to-run-it-repetitive/53700/4 "2020-08-04T12:31:50Z")

</div>

How about this?

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/a/aa3f809c6bfbb4fd295e35eb87d5db354b4bd666.png)

How do you paste code with indents or did you have to do it manually?

---

<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:** [August 4, 2020, 12:38pm UTC](https://forum.dynamobim.com/t/how-to-run-it-repetitive/53700/5 "2020-08-04T12:38:52Z")

</div>

so it is no need to store the _strings_ in a variable, i can _append_ them direktly!

and the doubling of “x” doesn`t matter, because they are in 2 diferent loops?

![2020-08-04_14h38_46](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/b/fb928a2e594c1fca1504aa759228b1c52e864f8f.png)

---

<div class="post-metadata">

**Author:** ![Alien](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alien/32/40701_2.png) [@Alien](https://forum.dynamobim.com/u/Alien)\
**Post date:** [August 4, 2020, 12:42pm UTC](https://forum.dynamobim.com/t/how-to-run-it-repetitive/53700/6 "2020-08-04T12:42:01Z")

</div>

I’ve only been learning Python for 2 months… So my understanding is very basic…

But x = [] creates a list.  
I’m appending (adding to the end of the list, which I have called x) on each loop.

Hope this helps. 🙂

---

<div class="post-metadata">

**Author:** ![solamour](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/solamour/32/153516_2.png) [@solamour](https://forum.dynamobim.com/u/solamour)\
**Post date:** [August 4, 2020, 1:22pm UTC](https://forum.dynamobim.com/t/how-to-run-it-repetitive/53700/7 "2020-08-04T13:22:23Z")

</div>

I explain a little about Python in this presentation: [https://github.com/Amoursol/dynamoPython/wiki/Diving-Deeper:-A-Beginners-look-at-Python-in-Dynamo](https://github.com/Amoursol/dynamoPython/wiki/Diving-Deeper:-A-Beginners-look-at-Python-in-Dynamo) 🙂 It should be useful conceptually!

Also, have a look at [https://github.com/Amoursol/dynamoPython](https://github.com/Amoursol/dynamoPython) which is a repository of 60+ Dynamo Python graphs (You can copy paste into nodes) from the community.

And then check out [https://dynamopythonprimer.gitbook.io/dynamo-python-primer/](https://dynamopythonprimer.gitbook.io/dynamo-python-primer/), an awesome resource by @oliver.green!

---

<div class="post-metadata">

**Author:** ![Alien](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alien/32/40701_2.png) [@Alien](https://forum.dynamobim.com/u/Alien)\
**Post date:** [August 4, 2020, 1:25pm UTC](https://forum.dynamobim.com/t/how-to-run-it-repetitive/53700/8 "2020-08-04T13:25:07Z")

</div>

Ooooo… I didn’t know about dynamo python primer!!

Thankyou 🙂

---

<div class="post-metadata">

**Author:** ![solamour](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/solamour/32/153516_2.png) [@solamour](https://forum.dynamobim.com/u/solamour)\
**Post date:** [August 4, 2020, 1:38pm UTC](https://forum.dynamobim.com/t/how-to-run-it-repetitive/53700/9 "2020-08-04T13:38:37Z")

</div>

You are most welcome @Alien! It’s a community creation by Oliver and `super` awesome 🙂

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [August 9, 2020, 10:36am UTC](https://forum.dynamobim.com/t/how-to-run-it-repetitive/53700/10 "2020-08-09T10:36:08Z")

</div>

> [@Alien](#):
>
> How do you paste code with indents or did you have to do it manually?

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/e/7ee4faf7fb532fc22f6b69a6e53837c94d4df1c7.jpeg)
