Contact: aviboots(AT)netvision.net.il
43,899 questions
57,294 answers
573 users
from itertools import permutations s = "xyz" permutation = [''.join(e) for e in permutations(s)] for s in permutation: print(s) ''' run: xyz xzy yxz yzx zxy zyx '''