I am trying to filter rows with empty columns and non-empty columns.
I have tried the following:
# ignore rows with null or empty cols
a = filter(lambda x: len(x) > 1 and x[1].strip(), file)
# len of rows with empty cols
b = filter(lambda x: x[1] == '', file)
This helps me ignore the rows with empty columns, but the second filter command is an empty list. What am I doing wrong here?