Skip to content

Instantly share code, notes, and snippets.

@alexgolec
Created January 18, 2019 16:32
Show Gist options
  • Save alexgolec/b70999e3dd7423e3a47daae47f3c7737 to your computer and use it in GitHub Desktop.
Save alexgolec/b70999e3dd7423e3a47daae47f3c7737 to your computer and use it in GitHub Desktop.
...
synonyms = defaultdict(set)
for w1, w2 in synonym_words:
synonyms[w1].append(w2)
synonyms[w2].append(w1)
...
elif w2 in synonyms.get(w1, tuple()):
continue
@heckad
Copy link

heckad commented Feb 1, 2019

and block

...
elif w2 in synonyms.get(w1, tuple()):
  continue

should have a indents, becouse it in loop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment