Categories
How to remove an empty list in a list?
That is, from this [[], "sgsegs", []] make ["sgsegs"]
Answer the question
In order to leave comments, you need to log in
a = [[], "sgsegs", []] b = [i for i in a if i]
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question