def all_subsets(items, subset, i):
    '''Generate all subsets of items.'''
    if i == len(items):
        print subset
    else:
        # Consider adding items[i] to the subset or not.
        pass
        
def all_perms(items, used, perm):
    '''Generate all permutations of items.'''
    if len(perm) == len(items):
        print perm
    else:
        # Try all choices of which unused item to add to the end of perm next.
        pass
            
        
if __name__ == '__main__':
    pass

