Why the script doesn't work?


1.gh (7.6 KB)

You need to set the "x’ input to List access and your type hint to either Integer or Float - then it will work, otherwise it thinks that the “1” in your list is a string and 1 as a string != 1 as an integer.

Also, you can make it much more compact with a list comprehension

1 Like

I’m self taught and I have this script in a definition.

Unless you plan to extend your script, I don’t think there’s a benefit of having a loop…

Right click on the ‘x’ input