I have a list of words and a string with spaces to put the words in. I need to be able to distribute the items from the list into the spots in the string.
Example:
list = ['text', 'be', 'there']
text = "This is an example [word]. Normally there would [word] something important here but [word] isn't."
The output would be:
"This is an example text. Normally there would be something important here but there isn't."
I would need the parts with '[word]' to be replaced with an item from the list. I am pretty new to python so forgive me if the answer is obvious.