python remove empty string from list

48

remove empty strings from list python -

without_empty_strings = [string for string in a_list if string != ""]

python remove empty list -

list2 = filter(None, list1)

Comments

Submit
0 Comments