Replacing specific words in text with words from another list python
Note that the condition if word in words in replacer performs a linear search on words if it's a list, as in the current code. Since this condition is executed for every word in the input, it would be good to optimize it a bit. You could for example pass a set of words instead of a list.

The names first_iter and second_iter are not very meaningful. It would be good to come up with some better names for these.