title: Python recursion permutations
body: <p>I'm having trouble trying to make a permutation code with recursion. This is suppose to return a list back to the use with all the possible position for each letter.</p>
  <p>For the word <code>cat</code>, it is suppose to return <code>['cat','act',atc,'cta','tca','tac']</code>.</p>
  <p>So far I have this code:</p>
  <pre><code>def permutations(s):
      lst=[]
      if len(s) == 1 or len(s) == 0 :
          # Return a list containing the string, not the string
          return [s]
      # Call permutations to get the permutations that don't include the
      # first character of s
      plst = permutations(s[1:])
      print(plst)
      for item in plst:
          print (item)
          plst= permutations(s[1+1:])
          
           # Now move through each possible position of the first character
          # and create a new string that puts that character into the strings
          # in plst
          for i in range(len(s)):
              pass
              # Create a new string out of item
              # and put it into lst
          # Modify
      for item in lst:
          print(index)
  </code></pre>
  <p>There are steps there but im not sure how to use them</p>