Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Remove empty strings from the list of strings

list1 = ["Mike", "", "Emma", "Kelly", "", "Brad"]

# remove None from list1 and convert result into list
res = list(filter(None, list1))
print(res)
Source by pynative.com #
 
PREVIOUS NEXT
Tagged: #Remove #empty #strings #list #strings
ADD COMMENT
Topic
Name
7+1 =