25

 import itertools


for perm in itertools.permutations('ABCDE'):

    print(''.join(perm))


Comments