I want to check if all the 2nd values of a list's sub-lists are OK.
ls = [['a', None], ['b', None], ['c', 2]]
How can I check that ls does not have all None's in the 2nd index of its sub-lists without for loop?
Would something like filter(lambda sublist, idx=1, value=None: sublist[idx] == value, ls) do the trick?