Task 8 of 11 · 0 solved · 11 to go0%
You can read the problem, but answers are checked only for signed-in students. Sign in to answer →

5.3 Lists — remove every zero

Total: 0 / 3 pts
Practice mode — check each part and get hints as you go.
Task

Fill in removeZeros so that it removes every zero from the list. The method returns nothing — it changes the given list.

The list contains two zeros in a row, so a forward loop would miss one. The program prints [4, 9].

Your solution