import random


def generate_key(word_list: list, words: int):
    """
    (method) generate_key
    ---------------------
    Generates a key.

    ---

    Parameters
    ```
    word_list : list
        The word list.
    words : int
        The number of words to include in the key.
    ```
    """
    return " ".join(random.choices(word_list, k=words))