79264730

Date: 2024-12-09 11:06:59
Score: 0.5
Natty:
Report link

You are trying to modify a list by using "for i in range of original list" while removing items from it, the list obviously becomes smaller than the range and just stops by the third iteration

Do this instead.

a = [1,3,4,5]
while a:
    print(a.pop())
print(a)
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Collins Olix