Simplifying a Scrabble Word Finder - Python I'm very new to coding and am trying to work through projects for practical review of what I know, but I would like to be able to simplify/improve what I've made.

This is a project I saw online that I tried to tackle today.  The task was to create something that would provide a list of the best possible words to play given a set of letters on your rack.

scores = {"a": 1, "c": 3, "b": 3, "e": 1, "d": 2, "g": 2,
         "f": 4, "i": 1, "h": 4, "k": 5, "j": 8, "m": 3,
         "l": 1, "o": 1, "n": 1, "q": 10, "p": 3, "s": 1,
         "r": 1, "u": 1, "t": 1, "w": 4, "v": 4, "y": 4,
         "x": 8, "z": 10}

def calc_score(word):
    """Calculate the score of a given word."""
    word_score = 0
    for x in word:
        word_score += scores[x]
    return word_score

def look_up():
    """Create the variable containing the master list of words."""
    read_dict = open("sowpods.txt", "r")
    master = read_dict.read()
    read_dict.close()
    master = master.split("\n")
    return master

word_master = look_up()

def rack_check(f_rack):
    """Check the letters in the rack against the SOWPOD dictionary and
    append valid words to a list."""
    valid_list = []
    for item in word_master:
        letter_bank = list(f_rack)
        for letter in item:
            if letter in letter_bank:
                valid = True
                letter_bank.remove(letter)
            else:
                valid = False
                break
        if valid == True:
            valid_list.append(item)
    return valid_list

def dict_maker():
    """Create a dictionary of the words with their scores."""
    valid_dict = {}
    f_list = rack_check(list((raw_input("Letters: ")).lower()))
    for i in f_list:
        valid_dict[i] = calc_score(i)
    return valid_dict

def list_print():
    """Print a list of the words in descending order of value."""
    dict = dict_maker()
    sort_dict = sorted(dict.items(), key=lambda k: k[1], reverse=True)
    for x in sort_dict:
        print x[0], "-", x[1]

list_print()


Calling the "list_print()" function runs through all the other necessary functions, but I feel like it could be cleaner.  Any feedback would be greatly appreciated.
The program is pretty good and clean so far, the docstrings are clear and it's easy to follow what's going on.

The scores dictionary is a constant, so it should be all uppercase.



Use a context manager to open the text file. This way you don't have
   to worry about the file not being closed, as the context manager does it for you.

def look_up():
    """Create the variable containing the master list of words."""
    with open('sowpods.txt', 'r') as f:
        return f.read().split('\n')




def calc_score(word):
    """Calculate the score of a given word."""
    word_score = 0
    for x in word:
        word_score += scores[x]
    return word_score


This can be rewritten using a list comprehension.

def calculate_score(word):
    """Calculate the score of a given word."""    
    return sum([SCORES[letter] for letter in word])


As you can see, we don't need to initialize an empty variable. Python is a self-documenting language.x isn't really a descriptive name, so I took the liberty to change it to letter. This one is a nitpick really, but I also change the function name to calculate_score.



Staying on comprehensions, you can use a dictionary comprehension in dict_maker. Here, we create a list of letters using list comprehension and then return a dictionary containing the word and its score.

def dict_maker():
    """Create a dictionary of the words with their scores."""
    letters = [letter for letter in raw_input('Letters: ').lower()]
    return {word: calculate_score(word) for word in rack_check(letters)}




I'm a little short on time to look over the logic, so I will finish the rest later, but here's some quick observations.


In list_print you assigned a dictionary using dict as its name. This is fairly uncommon practice, as it shadows a builtin. More on builtins.
word_master = look_up() should be contained in rank_check function. Furthermore, you can even replace for item in word_master: with for item in look_up()