## solution 1: fast enough response, simple function, fail fast
from time import clock
def isanaword(k,s):
    """ goes through the letters of second word (s) and returns it
        if first word (k) contains exactly same letters in same number
    for c in s:
        pos = k.find(c)
        if pos==-1: return "" ## letter not contained in first one found
        k = k[:pos]+k[pos+1:] ## drop the letter in found position pos by slicing
    if not k: return s ## if all letters used, full anagram

if __name__=="__main__":
    print('To quit enter empty line')
    inputword=' '
    while inputword:
        inputword=raw_input('Give word: ')
        if inputword:
            for wd in [w.rstrip()
                       for w in open('words.txt')
                       if (len(w) == len(inputword)+1 ## newline longer
                           and isanaword(w.rstrip(),inputword))]:
                print wd,
            print 'Took %i ms'%((clock()-t)*1000)

Edited 1 Year Ago by marcelocent: mispeling

I'm new at coding, how would I implement that Windows clipboard functionality to the script?

If you don't have Python34 get the appropriate installer version.
After that simply use the functions supplied by the snippet.

This question has already been answered. Start a new discussion instead.