How to remove the first empty string from a list of strings in Python

1 Answer

0 votes
lst = ["python", "", "", "java", "", "c#", ""] 
  
lst.remove("") 
      
print (lst) 



'''
run:

['python', '', 'java', '', 'c#', '']

'''

 



answered Jan 5, 2020 by avibootz

Related questions

4 answers 589 views
2 answers 761 views
1 answer 279 views
1 answer 273 views
2 answers 445 views
...