I want to delete all the "" chars in my list this code prints an error "list index out of range"
b = [5,"","","","",3,6,5]
for a in range(len(b)):
if b[a] == "":
b.remove("")
print(b)
I want to delete all the "" chars in my list this code prints an error "list index out of range"
b = [5,"","","","",3,6,5]
for a in range(len(b)):
if b[a] == "":
b.remove("")
print(b)