Need help with Python script to generate wordlist

I’m new to python and I’m trying to write a script that generates a custom wordlist.
Here is what I got so far ,but I’m stuck and I don’t know what how to implement the rest of my code.

-It has to be between 8-15 characters

  • Alphanumeric characters

  • Will contain a combination of the three full key words: NOSAM, ESYC, UMG

  • Any other characters prepended/appended to the key words will be numerical

  • Always has these numbers:

20

21

22

23

24

-This includes uppercase and lower-case permutations: (ex: esYc, NOSam, Umg)

  • Randomize the capitalization of words

  • The numbers go in between, before, and after the key words as well

Examples:

Nosam20umG23

2220ESYcumG

ESyc24Nosam20

EsycNOSAMUMG

noSAM21UMg

from random import choice
from itertools import product
import string
min_len = int(input('Enter minimum length of password: '))
max_len = int(input('Enter maximum length of password: '))
counter = 0
key_word = ['NOSAM', 'ESYC', 'UMG'] + ['20', '21', '22', '23', '24']
key_word = ''.join(choice((str.upper, str.lower))(i) for i in key_word)

charater = key_word
file_open = open("wordlist.txt", 'w')
for i in range(min_len,max_len+1):
    for j in product(charater, repeat = i):
        word = "".join(j)
        file_open.write(word)
        file_open.write('\n')
        counter += 1
    print("Wordlist of {} passwords created".format(counter))