I am trying to print a list, delete item 0 and then print the list again for all items in the list. This is very simple but it's not working as I expected.It stops short of completing the for loop for all of the list items.
I tried using the range function inside a list first with both the del and pop() methods. That did not work so I have been using a list and get the same results.
seals = [1,2,3,4,5,6,7,8,9]
for seal in seals:
print(seals)
seals.pop(0)
Expected Result
[1, 2, 3, 4, 5, 6, 7, 8, 9]
[2, 3, 4, 5, 6, 7, 8, 9]
[3, 4, 5, 6, 7, 8, 9]
[4, 5, 6, 7, 8, 9]
[5, 6, 7, 8, 9]
[6, 7, 8, 9]
[7, 8, 9]
[8, 9]
[9]
Actual Result
[1, 2, 3, 4, 5, 6, 7, 8, 9]
[2, 3, 4, 5, 6, 7, 8, 9]
[3, 4, 5, 6, 7, 8, 9]
[4, 5, 6, 7, 8, 9]
[5, 6, 7, 8, 9]