Dec-10-2016, 02:20 PM
Mine is similar to Yoriz's, but using sets:
def double_words(word_list): word_set = set(word_list) doubles = set(''.join(pair) for pair in itertools.permutations(word_list, 2) if ''.join(pair) in word_set) return [word for word in word_list if word in doubles]It works on Yoriz's word list. I ran it on the full word list I normally use. It ran quite a while and found 15,876 double words.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures