check condition for a list of lists

asked 2022-11-19 23:21:08 +0100

rizwan gravatar image

I have a list of lists L = [L1, L2, L3,... Lm] where each Li is a list again. I want to check each Li for a condition.

I need only those Li where all elements of Li satisfy a certain property.

I am trying the following but it's not working the way I want.

for i in range(0, len(L)): U = L[i] for s in U: check(s) But this does not distinguish between the elements of Li.

A little help is needed.

Thanks

edit retag flag offensive close merge delete