Python: How to remove empty lists from a list?
I have a list with empty lists in it: list1 = [[], [], [], [], [], 'text', 'text2', [], 'moreText'] How can I remove the empty lists so that I get: list2 = ['text', 'text2', 'moreText'] I tried list.remove(”) but that doesn’t work. Answers: Thank you for visiting the Q&A section on Magenaut. Please note … Read more