How to pull specific values out of list


Why is this not working

The default python template (node) explains how inputs and outputs are defined for the node. Inputs come from the IN variable(s) and the output is OUT.

The print() method writes to console, not the output.
image

You can use the same indexing method in a code block or you can use GetItemAtIndex.
image

Thank you!

And to expand…
A standard def result = var will pass a value to another variable within the node.

def myfunc()
    a = 1
    result = a

res = myfunc()
print(res)
OUT = res