I have a dynamo script in which I have organized pipe fabrication information into nested lists.
I want to access specific information in the nested list to organize the data to export to excel in a very specific format for the fabrication shop.
How do I best access nested list information using a python script in dynamo?
How do I use the print fuction within a dynamo script though?
My understanding was I can only output data from a python node by using the OUT = [variableA], [ETC]
Is it possible to let a variable equal the print function (like below example)?
VairableA = print(i[2] for i in data])
Or am I missing something?
Thanks again for the assistance
Make an empty list, and append objects to it. In principle that ‘prints’ an outcome developed within the Python node back to Dynamo canvas.
Print is really moreso for use outside Dynamo in Python IDE’s etc.
To access objects within a list you can use the ‘for’ loop statement to work your way through the list structure. You can then work through sub-lists by nesting more for loops, and so on so forth.
I was providing a basic example of a list comprehension rather than a dynamo python solution. However you have come to the right place with peeps like @GavinCrump and @Alien here to help!