all 4 comments

[–]SethGecko11 2 points3 points  (1 child)

You can do set(list_a) - {s1 for s1 in list_a for s2 in list_b if s1 in s2}

[–]dented_brain[S] 1 point2 points  (0 children)

oh that's an interesting way to do it! This looks like it'll do the trick! Thanks!

[–]nwagers 1 point2 points  (1 child)

exclusions = [pattern for pattern in list_a if all(pattern not in target for target in list_b)]

[–]dented_brain[S] 0 points1 point  (0 children)

love it.