Worded Mastermind game in Python
Some obvious changes that I'd make:

rename all the variables / methods such that they follow the snake_case convention
remove all the obvious comments and rather add a docstrings into each function instead
add only one space before and after any operator (except if we're passing some arguments into a function / class)
after , you should have a space
the acceptedWord list should be defined within the getWords() function (the same goes for the difficulty dictionary). (or better yet, remove its declaration completely and use list comprehension instead)
you should add if __name__ == '__main__'
user_list is already a list so you don't have to specify the exact same thing here: for item in list(user_list).
use string formatting when you print something: this: print(correct_guess, &quot;out of &quot;, len(true_list), &quot;correct.&quot;) will become this: print(&quot;{} out of {}&quot;.format(correct_guess, len(true_list)))
when you use with to open a file in read mode, you can omit r as that's passed by default.

Reviewed code:
import random


def get_words():
    &quot;&quot;&quot;Docstring goes here&quot;&quot;&quot;
    difficulty = {1: [4, 5, 6], 2: [7, 8], 3: [9, 10, 11], 4: [12, 13], 5: [14, 15]}
    while True:
        try:
            level = int(input(&quot;What difficulty would you like? (1,2,3,4,5) &quot;))
            break
        except (ValueError, KeyError):
            print(&quot;That is not a number&quot;)

    num = random.choice(difficulty[level])

    with open('wordbank.txt') as file:
        accepted_word = [x for x in map(str.upper, map(str.strip, file.readlines())) if len(x) == num]

    answers = random.sample(accepted_word, num)
    true_word = answers[random.randint(0, len(answers) - 1)]
    print('\n'.join(answers))
    game(true_word)


def game(true_word):
    &quot;&quot;&quot;Docstring goes here&quot;&quot;&quot;
    for x in range(0, 5):
        print(&quot;Guesses Left: {}&quot;.format(5 - x))
        user_input = input(&quot;Guess: &quot;).upper()

        user_list, true_list = list(user_input),  list(true_word)
        if user_input == true_word:
            print(&quot;Well done, you guessed correctly&quot;)
            get_words()
        correct_guess = 0
        for item in user_list:
            if item == true_list[user_list.index(item)]:
                correct_guess += 1
        print(&quot;{} out of {}&quot;.format(correct_guess, len(true_list)))
    print(&quot;Bad luck! The answer was: {}&quot;.format(true_word))
    get_words()

if __name__ == '__main__':
    get_words()

More, I'd split the get_words() methods into two methods: get_user_level() and get_words():
def get_user_level():
    &quot;&quot;&quot;Docstring goes here&quot;&quot;&quot;
    difficulty = {1: [4, 5, 6], 2: [7, 8], 3: [9, 10, 11], 4: [12, 13], 5: [14, 15]}
    while True:
        try:
            level = int(input(&quot;What difficulty would you like? (1,2,3,4,5) &quot;))
            break
        except (ValueError, KeyError):
            print(&quot;That is not a number&quot;)

    return random.choice(difficulty[level])


def get_words():
    &quot;&quot;&quot;Docstring goes here&quot;&quot;&quot;
    num = get_user_level()

    with open('wordbank.txt') as file:
        accepted_word = [x for x in map(str.upper, map(str.strip, file.readlines())) if len(x) == num]

    answers = random.sample(accepted_word, num)
    true_word = answers[random.randint(0, len(answers) - 1)]
    print('\n'.join(answers))
    game(true_word)