def sort_words(arguments, words):
    """
    Takes a dict of command line arguments and a list of words to be sorted.
    Returns a sorted list based on `alphabetical`, `length` and `reverse`.
    """
    if arguments.get('--alphabetical', False):
        words.sort()
    elif arguments.get('--length', False):
        words.sort(key=len)

    if arguments.get('--reverse', False):
        words.reverse()

    return words