I'd like to remove the list of dictionaries elements that have empty values.
So for the following:
dict = [{"end": "00:15", "item": "Paul Test 1", "start": "00:00"}, {"end": "00:14", "item": "Paul Test 2 ", "start": "00:30"}, {"end": "", "item": "", "start": ""}, {"end": "", "item": "", "start": ""}, {"end": "", "item": "", "start": ""}]
would return a new dict of:
[{"end": "00:15", "item": "Paul Test 1", "start": "00:00"}, {"end": "00:14", "item": "Paul Test 2 ", "start": "00:30"}]
I've tried:
{k:v for k,v in dict if not v}
but I'm getting:
ValueError: too many values to unpack (expected 2)