Write a Python program that takes a list of words and returns a dictionary where the keys are the words and the values are the lengths of the words.
words = ['cat', 'dog', 'kangaroo', 'tiger']
def word_lengths(words):
    lengths = {}
    for word in words:
        lengths[word] = len(word)
    return lengths

result = word_lengths(['cat', 'dog', 'kangaroo', 'tiger'])
print(result)