fork(1) download
  1. l = [1,2,3,4,5]
  2.  
  3. for i in l:
  4. l.remove(i)
  5. print(len(l))
  6.  
  7. print()
  8.  
  9. l = [1,2,3,4,5]
  10.  
  11. for i in reversed(range(len(l))):
  12. del l[i]
  13. print(len(l))
Success #stdin #stdout 0.02s 9944KB
stdin
Standard input is empty
stdout
4
3
2

4
3
2
1
0