If you do not mind generating a new list of results, you can do the following:
>>> [elemento for elemento in lista if elemento.strip() != ""]
['a', 'b', 'c']
In case you are sure that your list only contains strings (and it is worth remembering that it is good practice not to mix different types in lists), then you can do it in a simpler way:
>>> [elemento for elemento in lista if elemento.strip()]
['a', 'b', 'c']
This works because empty strings are evaluated as False
when used in a context that asks for a Boolean value. But since other things that are not empty strings are also evaluated as False
, only use if you are sure that all elements are strings.