Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #54632
| References | <9b5d915b-3750-43ab-9691-1b1445332c43@googlegroups.com> |
|---|---|
| Date | 2013-09-23 23:00 +1000 |
| Subject | Re: parse list recurisively |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.264.1379941213.18130.python-list@python.org> (permalink) |
On Mon, Sep 23, 2013 at 10:53 PM, <andypu@zoho.com> wrote: > Hello, > > i use a load of lists and often i dont know how deep it is, how can i parse that lists elegantly (without a bunch of for loops) You can write a function that calls itself - that's what "recursive" usually means in programming. Start with the tutorial on functions, or just search the web for 'python recursive function'. Once you have a bit of code down, you'll be able to ask a more specific question. Have fun! ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
parse list recurisively andypu@zoho.com - 2013-09-23 05:53 -0700
Re: parse list recurisively Chris Angelico <rosuav@gmail.com> - 2013-09-23 23:00 +1000
Re: parse list recurisively andypu@zoho.com - 2013-09-23 07:07 -0700
Re: parse list recurisively andypu@zoho.com - 2013-09-23 07:23 -0700
Re: parse list recurisively Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-09-23 15:10 +0100
csiph-web