I'm trying to remove some specific '' in the list using python.
The list is [1,'','',2,'','','',3,'']. I want to remove just one '' between two values. which means the output I want is [1,'',2,'','',3]. The code I had shows as below:
for j in range (len(lst)):
if len(lst[j]) == 1:
lst.remove(lst[j+1])