Python Python Collections (2016, retired 2019) Lists Removing items from a list

angel moreta
angel moreta
153 Points

I don't understand, I need hints no answers ?

I am working my brain, some help would be a jumpstart. Ok i don't understand what i am doing wrong here i type the same syntax on Atom and i run it on my terminal and boom i get a beautiful [1,2,3] no errors no problems, but in the code challenge something always pops up and it says (Bummer! Looks like you still need to remove some items from messy_list.)

i was wondering if there is any way to get through this challenge, I DON'T want answers but hints will be appreciated

my question : Great! Now use .remove() and/or del to remove the string, the boolean, and the list from inside of messy_list. When you're done, messy_list should have only integers in it.

my syntax: [alt text]
messy_list = ["a", 2, 3, 1, False, [1, 2, 3]]

# Your code goes below here
poppep = messy_list.pop(3)
def function(cleaner):
    for each in cleaner:
    return messy_list

1 Answer

Why are you making a function? It seems unnecessary... But if you would like to use a function, remember to call it.

Also, in your function, you are removing every single element in the list. The problem only asked you to remove the non-integers.

Happy coding! :zap: ~Alex