Tree library - multiple children

Joel Goldstick joel.goldstick at gmail.com
Thu Dec 12 14:40:19 EST 2013


On Thu, Dec 12, 2013 at 2:38 PM, MRAB <python at mrabarnett.plus.com> wrote:

> On 12/12/2013 19:30, Joel Goldstick wrote:
>
>> On Thu, Dec 12, 2013 at 2:26 PM, Neil Cerutti <neilc at norwich.edu
>> <mailto:neilc at norwich.edu>> wrote:
>>
>>     On 2013-12-12, Ricardo Aráoz <ricaraoz at gmail.com
>>     <mailto:ricaraoz at gmail.com>> wrote:
>>      > I need to use a tree structure. Is there a good and known library?
>>      > Doesn't have to be binary tree, I need to have multiple children
>>     per node.
>>
>>     Have you tried nested lists?
>>
>>     [[1, 2], [3, 4]
>>
>> I think that was a type for this:
>>
>>  I think that was a typo for "typo". :-)


OMG!   I saw that too!

>
>
>  [[1, 2], [3, 4]]
>>
>>
>>     Can represent
>>
>>           root
>>           /  \
>>        1-2    3-4
>>
>>     Python makes it very easy to manipulate such a structure. It
>>     isn't clear that you need more than that yet.
>>
>>
> --
> https://mail.python.org/mailman/listinfo/python-list
>



-- 
Joel Goldstick
http://joelgoldstick.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20131212/a93aa9a0/attachment.html>


More information about the Python-list mailing list