I have to print letters from an array backwards. I got all the letters to be backwards but I realized I used the sort method and I'm not allowed to use it. I can't figure out any other way. Any suggestions?
The output should be:
w
v
u
t
.
.
.
g
f
This is the code I have so far:
letter = ['f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w']
letter.sort(reverse=True)
for i in range(len(letter)):
print(letter[i])