def combination(items)
list = []
for i in range(0,len(items)):
for j in range(0,len(items)):
if j > i:
list.append((list[i],list[j]))
return listMy problems with this code being that a) code I write is usually pretty inefficient, b) it doesn't extend to subsets of size > 2, and c) it uses nested loops, which I have gathered from some previous discussions on this list to be less than ideal.
Any thoughts on how to improve / replace this code would be appreciated.
Thanks,
Bill _______________________________________________ Tutor maillist - [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/tutor
