the output if given a string, "abcdefg" of length 7 as example, should print out 7 lines like:
abcdefg
bcdefga
cdefgab
defgabc
efgabcd
fgabcde
gabcedf
but I seem to be missing the boat after many many hours of various loops and print statements
s = str("abcdefg")
print(s)
print()
for i in range(len(s)):
new_s = s[:i+1] + s[-i:] + s[-i]
print(new_s)
I get this:
abcdefg
aabcdefga
abgg
abcfgf
abcdefge
abcdedefgd
abcdefcdefgc
abcdefgbcdefgb