I made a search for stackoverflow about this but couldn\'t find a way to do it. It probably involves itertools.
I want to find all the possible results of splitting
You can use itertools.combinations here. You simply need to pick two splitting points to generate each resulting string:
from itertools import combinations
s = "thisisateststring"
pools = range(1, len(s))
res = [[s[:p], s[p:q], s[q:]] for p, q in combinations(pools, 2)]
print res[0]
print res[-1]
Output:
['t', 'h', 'isisateststring']
['thisisateststri', 'n', 'g']