I wrote a simple permutation function and I would like to graph its output. Is it even possible?
from itertools import permutations
def permutate(string):
letters = [x for x in string]
perms = list(permutations(letters, len(letters)))
p_set = set([''.join(i) for i in perms])
return p_set
a = list(permutate('abab'))
# output: ['abba', 'abab', 'aabb', 'baba', 'baab', 'bbaa']
I have difficulties finding materials about permutation graph so any help would be appreciated.
This is what I would like to achieve
Thank you!!!

