Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import codecs
- # http://natura.di.uminho.pt/download/sources/Dictionaries/wordlists/
- words = codecs.open("wordlist.txt", "r", "iso8859-1").readlines()
- valid = set()
- for w in words:
- w = w.strip().lower()
- valid.add(w)
- reversed_word = "".join(reversed(w))
- if reversed_word in valid:
- print(w, "<=>", reversed_word)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement