Great! Now use .remove() and/or del to remove the string, the boolean, and the list from inside of messy_list. When you'
i am getting the error message that Task 1 is not passing anymore. Please help
messy_list = ["a", 2, 3, 1, False, [1, 2, 3]] # Your code goes below here messy_list.pop(3) and messy_list.insert(0,1) messy_list.remove("a", False, [1, 2, 3] )
Steve HunterTreehouse Moderator 56,149 Points
I don't think you can pass multiple parameters to
remove. I used three lines to remove each item in turn.
The error you are getting is unhelpful but if task 1 did pass, it should still. Sometimes these challenges throw up messages likes that, though.
For task one, I
popped the element within the
insert method so it popped straight off, then back on again.
messy_list.insert(0, messy_list.pop(3)) messy_list.remove("a") messy_list.remove(False) messy_list.remove([1, 2, 3])
I hope that helps.
Yes, Steve is right, I tried for task two, combinations of del & remove * for the appropriate usage* but it didn't take it...Had to change to one type only.
adam n57,278 Points
.remove() can only remove one thing at a time.
Please mark my response as the 'best answer' if it helps you out!