combinations of variable length nested lists

Mark Robinson m.1.robinson at herts.ac.uk
Tue Aug 7 12:46:17 EDT 2001


David Lees wrote:

> If your list is called 'x' then len(x) will give you the number of
> sublists at the top level, which what you are asking for.
> 
> david lees


true, but in order to have used nested lists I would have needed to know 
that when coding, unless I used some kind of recursive function call. 
Thankfully a few very nice examples have since been posted illustrating 
how to do that, which is what I was really struggling with.

cheers blobby





More information about the Python-list mailing list