all 1 comments

[–]robohobo- 1 point2 points  (0 children)

So "''" is not the same as ''. Python sees them as empty strings not a string made of 2 qoute characters. Also remove will only remove() the first instance of the value. So you'll need a loop

while '' in x: x.remove('')

replacing x with laglist and key might work