input: Write a python function to generate all possible substrings of a given string.
  assert letterCombinations("abc") == ['a', 'ab', 'abc', 'b', 'bc', 'c']
  assert letterCombinations("xyz") == ['x', 'xy', 'xyz', 'y', 'yz', 'z']
  assert letterCombinations("a") == ['a']
output: def letterCombinations(s):
      result = []
      for i in range(len(s)):
          for j in range(i + 1, len(s) + 1):
              result.append(s[i:j])
      return result