Human: what's a good way to combinate through a set? Assistant: 
Here is some code to create a list with permutations of string 'abcd'

list(powerset('abcd'))

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.