Richard Cairns1,736 Points
Having trouble with Task 2/2 in the Python Collections course
I have to write code to remove the non-integer items from the list.
My code is failing with the message "It looks like Task 1 is no longer passing".
I haven't changed the code for Task 1 at all - it passed previously. I don't understand why the subsequent code would change the pass / fail for Task 1.
messy_list = ["a", 2, 3, 1, False, [1, 2, 3]] # Your code goes below here messy_list.insert(0, messy_list.pop(3)) messy_list.remove("a") messy_list.remove(False) messy_list.remove[1,2,3]
The problem was with this line:
You had forgot to put brackets around the array that you are trying to remove from the array so it didn't work. It should look like this