Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #61747

Re: Tree library - multiple children

Date 2013-12-12 19:38 +0000
From MRAB <python@mrabarnett.plus.com>
Subject Re: Tree library - multiple children
References <52A9FD0A.9080804@gmail.com> <l8d2m1$ql$1@ger.gmane.org> <CAPM-O+zmfm67y8G4QRwW8+REMhSpNCcpfa-rr9ATiVdGKdzP+Q@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.4018.1386877088.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 12/12/2013 19:30, Joel Goldstick wrote:
> On Thu, Dec 12, 2013 at 2:26 PM, Neil Cerutti <neilc@norwich.edu
> <mailto:neilc@norwich.edu>> wrote:
>
>     On 2013-12-12, Ricardo Aráoz <ricaraoz@gmail.com
>     <mailto:ricaraoz@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". :-)

> [[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.
>

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Tree library - multiple children MRAB <python@mrabarnett.plus.com> - 2013-12-12 19:38 +0000

csiph-web