# Combine all Lists from nested Subprogramm [Animation Nodes]

I got two lists from other calculations, one with a count (ex.: 6, 11, 16, 19, 20) and a second list witch gives me degrees as a step with which i want to instance objects around a circle (60 , 32.7, 22.5, 18.9, 18).

Specific I want to to instantiate 6 objects along a circle (radius from separate list) in steps of 60 degree z axis, then 11 Instances with 32.7 degree… etc.

From my little programming experience i wanted to do it with a nested loop because it should work parametrically for even longer lists then list.length 5, so i couldn't build a loop for every list.element by hand.

My Problem ist that from the VectorList.outs of the lower one of the nested loops i only get the last Vector List and cant combine them to a final list in which there are all location at once for instantiation.

I hope my problem is clear enough yet, maybe i will try to explain it better in the evening. But I thought maybe ist just difficult for me as an Animation Nodes Beginner

Greetings AM

Solution 1 but not with AN: Found a way to do it with Python(Beginner) script inside AN, maby its clearer know what i wanted to do with AN than in my description. Question is still open because i want to learn AN and not do it with Python.

#node_in: Count_List [6, 11, 16, 19, 20]
#node_in: Degree_List [60 , 32.7, 22.5, 18.9, 18]

tempList = []

for index, item in enumerate(Count_List):
value = Count_List[index]
for index2, x in enumerate(range(int(value))):
result = Degree_List[index] * (1 + index2)
tempList.append(result)

return tempList


this List then goes to the instantiator-node

• Can you share the node tree you tried in AN? Feb 8 '19 at 20:52