def generation_parties2(L,m): n=len(L) if m>n: return elif m==2: return {(a,b) for a in L for b in L if a