#NEWLINE# def unique_combinations( items , n ) : #NEWLINE# #INDENT# if ( n == 0 ) : #NEWLINE# #INDENT# ( yield [ ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# for i in range ( len ( items ) ) : #NEWLINE# #INDENT# for cc in unique_combinations ( items [ ( i + 1 ) : ] , ( i - 1 ) ) : #NEWLINE# #INDENT# ( yield ( [ items [ i ] ] + cc ) )