class Solution:
"""
@param: : a string to be split
@return: all possible split string array
"""
def splitString(self, s):
# write your code here
result = []
self.dfs(s, [], result)
return result
def dfs(self, s, path, result):
if s == '':
result.append(path[:])
return
for i in range(2):
if i + 1 <= len(s):
path.append(s[:i+1])
self.dfs(s[i+1:], path, result)
path.pop()