I have a string of letters that I\'d like to split into all possible combinations (the order of letters must be remain fixed), so that:
s = \'monkey\'
def splitter(str):
for i in range(1, len(str)):
start = str[0:i]
end = str[i:]
yield (start, end)
for split in splitter(end):
result = [start]
result.extend(split)
yield result
combinations = list(splitter(str))
Note that I defaulted to a generator to save you from running out of memory with long strings.