I'm a dynamo new user I need a "loop" help thanks PLZ~~

Hi I’m a dynamo new user .I got a stupid questions to want to know,thanks:)

Who can help me do the “loop” plz,thanks

try this using python

mylis= IN[0]
nlis=[]
for a in range(0,len(mylis)-1):
    nlis.append(mylis[a])
    if mylis[a]+1!=mylis[a+1]:
        nlis.append("NON")

#Assign your output to the OUT variable.
OUT = nlis

2

Hi,
as a new user, I suggest you not to start with DS looping, you almost never need them.
Here is a way to do it without looping, and another way with a Python loop, that is way easier to handle:

a = IN[0]
b = IN[1]

output = []

for x in b:
	if x in a:
		output.append(x)
	else:
		output.append("NON")
		
OUT = output
3 Likes

thanks a lot:) I will learn more about Dynamo~

thanks a lot:)