On Mar 4, 9:46 pm, Jason Galyon <[EMAIL PROTECTED]> wrote: > Gabriel Genellina wrote: > > En Tue, 04 Mar 2008 23:50:49 -0200, Jason <[EMAIL PROTECTED]> escribió: > > >> How could I return a list or tuple of each unique combination of a given > >> set of lists (perhaps from a dict or a list). This means the number of > >> lists are not known nor is the length of each. > > > Use the Google interfase for this group: > >http://groups.google.com/group/comp.lang.python/ > > Type "unique combinations lists" in the text box; press "Search in this > > group". The very first result contains some answers to your question. > > found it, the referenced cookbook recipe is perfect. > > Thanks, Gabriel
That reminds me: Is there a generic 'relation' pattern/recipie, such as finding a computer that's "paired" with multiple users, each of who are "paired" with multiple computers, without maintaining dual- associativity? Good: py> user.getcomputers() [ Compie1, Compie2 ] Bad: user._computers.add( compieN ) compieN._users.add( user ) ? -- http://mail.python.org/mailman/listinfo/python-list