I want to create a program that will take a string, and print out every possible combination of the string.
My idea is to turn the string into a list of letters:
scram = input()
scram = list(scram)
Then I would use a for loop to iterate through each letter:
for letter in scram:
The problem is that I would like to move the current letter to the beginning of the string, but I'm not sure how to do that. After that I would try print out every version of the list while the current letter is at the beginning of the list. How could I go about doing this?