On Monday, September 4, 2017 at 9:14:24 PM UTC+1, Ben Bacarisse wrote: > Rustom Mody <rustompm...@gmail.com> writes: > > > Here is some code I (tried) to write in class the other day > > > > The basic problem is of generating combinations > <snip> > > Now thats neat as far as it goes but combinations are fundamentally sets > > not lists > > > > So I thought python would do a better job > > I tried translating it to python and sets but it turned out more annoying > > than > > helpful > > Can someone improve it?? > >
[lots of code snipped] > -- > Ben. Here's my take https://docs.python.org/3/library/itertools.html#itertools.combinations Kindest regards. Mark Lawrence. -- https://mail.python.org/mailman/listinfo/python-list