I do the "for x in y" loop in python, and try to delete every empty ("") element. But it doesn't catch every empty element, and I have to run it multiple times.
I tried changing the output and manually loading it into an array, which didn't work either. I tried it on Python3.4 aswell, but the same problem persisted there.
temp
Output: ['18:10:01', '', '', '', '', '', '', '', 'all', '', '', '', '', '', '0.42', '', '', '', '', '', '0.00', '', '', '', '', '', '0.48', '', '', '', '', '', '0.03', '', '', '', '', '', '0.18', '', '', '', '', '98.89']
for c in temp:
if(c==''):
temp.remove(c)
temp
Output: ['18:10:01', 'all', '0.42', '0.00', '', '0.48', '', '', '', '', '', '0.03', '', '', '', '', '', '0.18', '', '', '', '', '98.89']
I expected it to go through the array and delete every empty element, leaving only the data i want. But as you can see from the output of the last line, it isn't the case. It still has quite a few empty elements.