How to delete all elements that have a list in python?