def choose_1_from_each(lists):
    """Takes a list of lists and returns a list of lists with one item
    from each list.  This new list should be the length of each list multiplied
    by the others.  18 for an list with lists of 3, 2 and 3.  Also the lenght
    of each sub list should be same as the length of lists passed in.

    Args:
        lists(list of Lists):  A list of lists

    Returns:
        list of lists: returns a list of lists constructions of one item from each
            list in lists.
    """
    if len(lists) == 0:
        yield []
    else:
        for el in lists[0]:
            for next_list in choose_1_from_each(lists[1:]):
                yield [el] + next_list
def choose_1_from_each ( lists ) : if len ( lists ) == 0 : yield [ ] else : for el in lists [ 0 ] : for next_list in choose_1_from_each ( lists [ 1 : ] ) : yield [ el ] + next_list
Takes a list of lists and returns a list of lists with one item
    from each list.  This new list should be the length of each list multiplied
    by the others.  18 for an list with lists of 3, 2 and 3.  Also the lenght
    of each sub list should be same as the length of lists passed in.

    Args:
        lists(list of Lists):  A list of lists

    Returns:
        list of lists: returns a list of lists constructions of one item from each
            list in lists.