adjectiveentered = input("Enter an adjective: ") print("The adjective entered is: ", adjectiveentered) sentenceentered = input("Enter a sentence with 'the' in it: ") print("The sentence entered is: ", sentenceentered) # check to see if "the" is in the sentence if "the" in sentenceentered: print("The word 'the' is in the sentence!") print ("Now we will convert the sentence string into a list of words.") listfromsentence = sentenceentered.split() print("The list from the sentence is: ", listfromsentence) print("Now we are going to find the location of 'the' in the list.") locationofthe = listfromsentence.index("the") print ("The location of 'the' in the list is: ", locationofthe) print("Now we are going to insert the adjective entered into the list.") # we need to add one to the "locationofthe" to put the adjective in the correct # position in the list listfromsentence.insert(locationofthe+1, adjectiveentered) print("The list now reads: ", listfromsentence) print("Now we are going to convert this list back into a string.") sentenceasstring = " ".join(listfromsentence) print("The list as a string is: ", sentenceasstring)