# Animation nodes nested loops

I would like to replicate the following python code in animation nodes:

a = [1,2,3]
c = []

for i in a:
for k in a:
c.append(i*k)
print(c)


The output is [1, 2, 3, 2, 4, 6, 3, 6, 9].

However in animation nodes I can not make this work. Below is my current nodes setup: (I know that this could be done in AN in a simpler way however I need something like this for a more complicated project.)

• – batFINGER Dec 30 '20 at 16:31