title: find all possible ways to build a specific string
body: <p>I am trying to generate all possible ways to build a target string from source string in Python.</p>
  <ul>
  <li>source: cattcat</li>
  <li>target: cat</li>
  </ul>
  <p>output: 5</p>
  <ul>
  <li>(cat)tcat</li>
  <li>(ca)t(t)cat</li>
  <li>(ca)ttca(t)</li>
  <li>(c)attc(at)</li>
  <li>catt(cat)</li>
  </ul>