Please note I recently started learning Python in grasshopper. With that being said, I haven’t been able to solve the following.
The goal is to find a match from list A to the item 0 of the branches in list B. “if” they match to create a new list. There might be 2 or more matches per item from list A and that is alright.
If there is a tutorial you suggest that I could follow I would really appreciate it or to please point me in the right direction.
There are a lot of ways to approach this in Python.
The first issue is that you have a tree coming into the Y input. Trees are specific to Grasshopper, so it requires and additional set of methods. Here are the tree methods: Rhino - Grasshopper data trees and Python
It shows how to convert a tree into a list of lists and then methods to take a list back into a tree.
Perhaps that will give you enough hints as to how to insert the X list into a tree that is similiar.