Given a string, write a function that uses recursion to output a list of all the possible permutations of that string. For example, given s='abc' the function should return ['abc', 'acb', 'bac', 'bca', 'cab', 'cba']
Note: If a character is repeated, treat each occurrence as distinct, for example an input of 'xxx' would return a list with 6 "versions" of 'xxx'
Create your solution in the form:
def permute(s):
pass
>>> permute('abc')
['abc', 'acb', 'bac', 'bca', 'cab', 'cba']