python_data_scien/poc2/poc2_mini_proj_2.py
def gen_all_strings(word):
    """
    Generate all strings that can be composed from the letters in word
    in any order.

    Returns a list of all strings that can be formed from the letters
    in word.

    This function should be recursive.
    """
    if len(word) == 1:
        return ['',word]
    elif len(word) == 0:
        return ['']
    else:
        first = word[0]
        rest = word[1:]
        rest_strings = gen_all_strings(rest)
        rest_strings2 = []
        for index_i in range(len(rest_strings)):
            item = rest_strings[index_i]
            for index_j in range(len(item)):
                rest_strings2.append(item[:index_j]+first+item[index_j:])
            rest_strings2.append(item+first)
        return rest_strings+rest_strings2

    Generate all strings that can be composed from the letters in word
    in any order.

    Returns a list of all strings that can be formed from the letters
    in word.

    This function should be recursive.
    
Generate all strings that can be composed from the letters in word
in any order.

Returns a list of all strings that can be formed from the letters
in word.

This function should be recursive.
Generate all strings that can be composed from the letters in word in any order . Returns a list of all strings that can be formed from the letters in word . This function should be recursive .
def gen_all_strings(word):
    if len(word) == 1:
        return ['',word]
    elif len(word) == 0:
        return ['']
    else:
        first = word[0]
        rest = word[1:]
        rest_strings = gen_all_strings(rest)
        rest_strings2 = []
        for index_i in range(len(rest_strings)):
            item = rest_strings[index_i]
            for index_j in range(len(item)):
                rest_strings2.append(item[:index_j]+first+item[index_j:])
            rest_strings2.append(item+first)
        return rest_strings+rest_strings2
def gen_all_strings ( word ) : if len ( word ) == 1 : return [ '' , word ] elif len ( word ) == 0 : return [ '' ] else : first = word [ 0 ] rest = word [ 1 : ] rest_strings = gen_all_strings ( rest ) rest_strings2 = [ ] for index_i in range ( len ( rest_strings ) ) : item = rest_strings [ index_i ] for index_j in range ( len ( item ) ) : rest_strings2 . append ( item [ : index_j ] + first + item [ index_j : ] ) rest_strings2 . append ( item + first ) return rest_strings + rest_strings2
Generate all strings that can be composed from the letters in word
in any order.
Generate all strings that can be composed from the letters in word in any order .
"""
    Generate all strings that can be composed from the letters in word
    in any order.

    Returns a list of all strings that can be formed from the letters
    in word.

    This function should be recursive.
    """
word