How to retrive item 0 of multi nested output? [Python]

Hi,

I am using

CollisionManyXMany from ghpythonlib.components. It says.

| Returns:
| collision [Boolean] - True if object at this index collides with any of the other objects
| indices [Integer] - Index of object in set which collided with the object at this index

I just need the boolean. How can I retrive it?
Thanks

Hi,

Add a [0] after your function call?

Cool, thanks!

Do you happen to know any documentation with this specific information? I could not find it anywhere.

For anyone interested this was it:

bool = gh.CollisionManyXMany(curves)[0]

Yes it’s callled indexing. to retrieve item n from a collection you write [n] after the collection.

https://ironpython-test.readthedocs.io/en/latest/tutorial/datastructures.html

1 Like