title: Python every possible combination of a string
body: <p>Hi so I'm working with python and I'm trying to write a method where given a string, it would find every combination of that string and append it to a list. I'll give the string and show the outcome that I want.</p>
  
  <p>string: <code>x = 'god'</code></p>
  
  <p>outcome:</p>
  
  <pre><code>lst = ['g', 'o', 'd', 'go', 'gd', 'og', 'od', 'dg', 'do', 'god', 'gdo', 'ogd', 'odg', 'dgo', 'dog']
  </code></pre>
  
  <p>A letter can only be used by the number of times it appears on the string given, so if our string is <code>'god'</code>, <code>'gg'</code> or <code>'goo'</code> etc. cannot be appended. If this could be done using recursion that would be great!</p>