我有一个包含空列表的列表:
list1 = [[], [], [], [], [], 'text', 'text2', [], 'moreText']
如何删除空列表以便我得到:
list2 = ['text', 'text2', 'moreText']
我尝试了list.remove(''),但这不起作用.
python list
list ×1
python ×1