Anagram Code in Python - Compare dynamically generated strings to a txt file
I have written an Anagram solving program in Python. I wanted your opinion on whether I had gone about it right. Let me explain the logic: 
1. First, the user provides input of two words that he/she wants the single word anagram to be generated for (2 string values) 
2. The two are concatenated and there is third value that is derived. 
3. The third value is processed by the itertools.permutations function where all possible permutations of the word are derived as a list. 
4. The list is formatted with string value being derived from the list. 
5. At this point, I have opened a word list that will be used as a dictionary to compare whether the string value is an actual word. 
6. The file is read, line by line and the string value is compared with the lines. 
7. If a match is found, then the program prints the output on screen as a Dictionary Match 

Please tell me if I am going about it right or if any improvements can be suggested. Any feedback appreciated.I am new to Python.

Here is the code: 

        #This program has been created to solve anagram puzzles
    
    # All the imports go here
    #import re
    import itertools
    import fileinput

    def anaCore():
        print 'This is a Handy-Dandy Anagram Solving Machine'
        print 'First, we enter the first word....'
        anaWordOnly = False
    
        firstWord = raw_input('Please enter the first word > ')
        print 'Thank you for entering %r as your first word' % firstWord
        print 'Now we enter the second word....'
        secondWord = raw_input('Please enter the second word > ')
        print 'Thank you for entering %r as your second word' % secondWord
    
        thirdWord = firstWord+secondWord
    
        print thirdWord
    
        mylist = itertools.permutations(thirdWord)
    
        for a in mylist:
            #print a
            mystr = ''.join(a)
            for line in fileinput.input("brit-a-z.txt"):       
                if mystr in line:
                    print 'Dictionary match found', mystr
            #print mystr
        
            
    
    
    anaCore()
Anagram Code in Python - Compare dynamically generated strings to a txt file
===

I have written an Anagram solving program in Python. I wanted your opinion on whether I had gone about it right. Let me explain the logic: 
1. First, the user provides input of two words that he/she wants the single word anagram to be generated for (2 string values) 
2. The two are concatenated and there is third value that is derived. 
3. The third value is processed by the itertools.permutations function where all possible permutations of the word are derived as a list. 
4. The list is formatted with string value being derived from the list. 
5. At this point, I have opened a word list that will be used as a dictionary to compare whether the string value is an actual word. 
6. The file is read, line by line and the string value is compared with the lines. 
7. If a match is found, then the program prints the output on screen as a Dictionary Match 

Please tell me if I am going about it right or if any improvements can be suggested. Any feedback appreciated.I am new to Python.

Here is the code: 

        #This program has been created to solve anagram puzzles
    
    # All the imports go here
    #import re
    import itertools
    import fileinput

    def anaCore():
        print 'This is a Handy-Dandy Anagram Solving Machine'
        print 'First, we enter the first word....'
        anaWordOnly = False
    
        firstWord = raw_input('Please enter the first word > ')
        print 'Thank you for entering %r as your first word' % firstWord
        print 'Now we enter the second word....'
        secondWord = raw_input('Please enter the second word > ')
        print 'Thank you for entering %r as your second word' % secondWord
    
        thirdWord = firstWord+secondWord
    
        print thirdWord
    
        mylist = itertools.permutations(thirdWord)
    
        for a in mylist:
            #print a
            mystr = ''.join(a)
            for line in fileinput.input("brit-a-z.txt"):       
                if mystr in line:
                    print 'Dictionary match found', mystr
            #print mystr
        
            
    
    
    anaCore()