title: Finding characters in a string based on white spaces
body: <p>So I am trying to get a function working that will return a new list of single characters that immediately follow two other given characters. Like so:</p>
  
  <pre><code>def filter_possible_chars(corpus, last):
      """
      &gt;&gt;&gt; filter_possible_chars('lazy languid line', 'la')
      ['z', 'n']
      &gt;&gt;&gt; filter_possible_chars('pitter patter', 'tt')
      ['e', 'e']
      """
      char_list = []
      corpus_split = corpus.split()
      for word in corpus_split:
          if last in word:
              word_split = word.split(last)
              follows_last = word_split[1]
              char_list.append(follows_last[0])
      return char_list
  </code></pre>
  
  <p>This function works perfectly for the examples given in the docstring, however I need to include examples that include white space, e.g.:</p>
  
  <pre><code>&gt;&gt;&gt; filter_possible_chars('when the goat jumped to the rock', ' t')
  </code></pre>
  
  <p>And it would return:</p>
  
  <pre><code>['h', 'o', 'h']
  </code></pre>
  
  <p>But since my function is obviously deleting the white space I think I need to try an entirely different method here. I thought about not splitting the string into individual words and trying to index into it with the given letters, but I cannot think of a way to make that work for more than one instance in a string.</p>