I am writing a program that is supposed to print:
A abcdefghijklmnopqrstuvwxyz
B bcdefghijklmnopqrstuvwxyz
C cdefghijklmnopqrstuvwxyz
D defghijklmnopqrstuvwxyz
E efghijklmnopqrstuvwxyz
F fghijklmnopqrstuvwxyz
G ghijklmnopqrstuvwxyz
H hijklmnopqrstuvwxyz
I ijklmnopqrstuvwxyz
J jklmnopqrstuvwxyz
K klmnopqrstuvwxyz
L lmnopqrstuvwxyz
M mnopqrstuvwxyz
N nopqrstuvwxyz
O opqrstuvwxyz
P pqrstuvwxyz
Q qrstuvwxyz
R rstuvwxyz
S stuvwxyz
T tuvwxyz
U uvwxyz
V wxyz
X xyz
Y yz
Z z
I have written the following code for the program but it does not print out what I want it to. This is what I have written for the program:
alphabet = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
for k in range(len(alphabet)):
for j in range(len(alphabet)):
print(alphabet[j-k],end='')
print('\n')`
and it prints out:
abcdefghijklmnopqrstuvwxyz
zabcdefghijklmnopqrstuvwxy
yzabcdefghijklmnopqrstuvwx
xyzabcdefghijklmnopqrstuvw
wxyzabcdefghijklmnopqrstuv
vwxyzabcdefghijklmnopqrstu
uvwxyzabcdefghijklmnopqrst
tuvwxyzabcdefghijklmnopqrs
stuvwxyzabcdefghijklmnopqr
rstuvwxyzabcdefghijklmnopq
qrstuvwxyzabcdefghijklmnop
pqrstuvwxyzabcdefghijklmno
opqrstuvwxyzabcdefghijklmn
nopqrstuvwxyzabcdefghijklm
mnopqrstuvwxyzabcdefghijkl
lmnopqrstuvwxyzabcdefghijk
klmnopqrstuvwxyzabcdefghij
jklmnopqrstuvwxyzabcdefghi
ijklmnopqrstuvwxyzabcdefgh
hijklmnopqrstuvwxyzabcdefg
ghijklmnopqrstuvwxyzabcdef
fghijklmnopqrstuvwxyzabcde
efghijklmnopqrstuvwxyzabcd
defghijklmnopqrstuvwxyzabc
cdefghijklmnopqrstuvwxyzab
bcdefghijklmnopqrstuvwxyza
abcdefghijklmnopqrstuvwxyz
I need help to figure out what I did wrong and what I need to do for the code to print what I want it to print.