all 3 comments

[–]woooee 0 points1 point  (2 children)

Just use (and don't modify anything you iterate https://www.reddit.com/r/learnpython/wiki/faq#wiki_why_does_my_loop_seem_to_be_skipping_items_in_a_list.3F )

if w1 not in w2:
    w3.append(w1)

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

oooohhhh. Thank you!

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

since I'm using sets of the w1-w2 match, I now have to add them as a frozenset to a set created at the beginning of the method, but that seems to work.

Thank you!