Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #61744
| References | <52A9FD0A.9080804@gmail.com> <l8d2m1$ql$1@ger.gmane.org> |
|---|---|
| Date | 2013-12-12 14:30 -0500 |
| Subject | Re: Tree library - multiple children |
| From | Joel Goldstick <joel.goldstick@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.4015.1386876619.18130.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
On Thu, Dec 12, 2013 at 2:26 PM, Neil Cerutti <neilc@norwich.edu> wrote: > 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] > I think that was a type for this: [[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 > > -- > https://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick http://joelgoldstick.com
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Tree library - multiple children Joel Goldstick <joel.goldstick@gmail.com> - 2013-12-12 14:30 -0500
csiph-web