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 359 views
2 answers 627 views
1 answer 180 views
1 answer 165 views
2 answers 300 views
...