Question: how to filter in seq?

mm := [[a, 1], [a, b]];
mmseq := {seq(mm[ij],ij=1..2)};

how to filter above in seq when any items in the [] has 1

criteria is below

if mm[ij][1] = 1 or mm[ij][2] = 1 or mm[ij][3] = 1 then
Dummy := 0:
else
mm2 := [op(mm2), mm[ij]]:
end if

 

Please Wait...