def powerset(lst):
    """returns the power set of the list - the set of all subsets of the list"""
    if lst == []:
        return [[]]
    #power set is a list of lists
    #this way is more efficent for getting the combinations of the characters in a list
    lose_it = powerset(lst[1:])
    use_it = map(lambda subset: [lst[0]] + subset, lose_it)
    return lose_it + use_it