I am trying to write a simple Python script capable of the following:
The user inputs a string of letters and the code returns the combinations in the following way:
ABC ----> ABC, CAB, BCA.
In this instance the "neighbors" remain the same but the last letter is moved to the beginning. I've been trying itertools but combinations and permutations aren't exactly what I'm looking for. Any help would be greatly appreciated!