A program removes items from a list while a loop reads the same list. nums = [1, 2, 2, 3, 4] for n in nums: if n % 2 == 0: nums.remove(n) print(nums) What does the program print?
[1, 3]
[1, 2, 3, 4]
[1, 2, 3]
[1, 3, 4]
Log in to join the discussion.
Loading…