For the first problem, use the replace
method.
word = "your_word"
new_word = "new_word"
html_text.replace(word, new_word)
Also I have a list with 12 elements. Each element is a word. I need to replace each word with the appropriate word from the list.
Create a dictionary mapping "old word" to "new word"
>>> list = ["oldword0", "oldword1"]
>>> mapping = {"oldword0": "newword0", "oldword1": "newword1"}
>>> map(lambda x: mapping[x], list)
['newword0', 'newword1']