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


Groups > comp.lang.python > #61743

Re: Tree library - multiple children

From Neil Cerutti <neilc@norwich.edu>
Subject Re: Tree library - multiple children
Date 2013-12-12 19:26 +0000
Organization Norwich University
References <52A9FD0A.9080804@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.4014.1386876443.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 2013-12-12, Ricardo Aráoz <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]

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.

-- 
Neil Cerutti

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


Thread

Re: Tree library - multiple children Neil Cerutti <neilc@norwich.edu> - 2013-12-12 19:26 +0000

csiph-web