What do you think is wrong with my code ?
sauerkraut abcdefghijklmnopqrstuvwxyz stuvwxyzabcdefghijklmnopqr abcdefghijklmnopqrstuvwxyz uvwxyzabcdefghijklmnopqrst efghijklmnopqrstuvwxyzabcd klmnopqrstuvwxyzabcdefghij rstuvwxyzabcdefghijklmnopq abcdefghijklmnopqrstuvwxyz tuvwxyzabcdefghijklmnopqrs message = input("Enter a codeword :") string = "abcdefghijklmnopqrstuvwxyz" size=len(string) message=' '.join(sorted(set(message), key= message.index)) print(string) for first in message: for i in range(len(string)): if first==string[i]: print(string[i:size]+string[0:i-size]) output for my code attempt : abcdefghijklmnopqrstuvwxyz stuvwxyzabcdefghijklmnopqr abcdefghijklmnopqrstuvwxyz uvwxyzabcdefghijklmnopqrst efghijklmnopqrstuvwxyzabcd rstuvwxyzabcdefghijklmnopq klmnopqrstuvwxyzabcdefghij tuvwxyzabcdefghijklmnopqrs