Re: Tree library - multiple children

Discussion in 'Python' started by Joel Goldstick, Dec 12, 2013.

  1. On Thu, Dec 12, 2013 at 2:38 PM, MRAB <> wrote:

    > On 12/12/2013 19:30, Joel Goldstick wrote:
    >
    >> On Thu, Dec 12, 2013 at 2:26 PM, Neil Cerutti <
    >> <mailto:>> wrote:
    >>
    >> On 2013-12-12, Ricardo Aráoz <
    >> <mailto:>> 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
    Joel Goldstick, Dec 12, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ricardo Aráoz

    Tree library - multiple children

    Ricardo Aráoz, Dec 12, 2013, in forum: Python
    Replies:
    2
    Views:
    88
    Ricardo Aráoz
    Dec 13, 2013
  2. Terry Reedy

    Re: Tree library - multiple children

    Terry Reedy, Dec 12, 2013, in forum: Python
    Replies:
    0
    Views:
    60
    Terry Reedy
    Dec 12, 2013
  3. Neil Cerutti

    Re: Tree library - multiple children

    Neil Cerutti, Dec 12, 2013, in forum: Python
    Replies:
    0
    Views:
    57
    Neil Cerutti
    Dec 12, 2013
  4. Joel Goldstick

    Re: Tree library - multiple children

    Joel Goldstick, Dec 12, 2013, in forum: Python
    Replies:
    0
    Views:
    58
    Joel Goldstick
    Dec 12, 2013
  5. MRAB
    Replies:
    0
    Views:
    57
Loading...

Share This Page