I made this code
def selections(seq, n): if n == 0: yield [] else: for i in range(len(seq)): # recursion