I have two text files:

1. Stopwords.txt --> contains stop words one per line
2. text.txt --> big document file

I'm trying to remove all occurences of stopwords (any word in the stopwords.txt file) from the text.txt file **without using NLTK** (school assignment).

How would I go about doing this? This is my code so far. 

```
import re

with open('text.txt', 'r') as f, open('stopwords.txt','r') as st:
    f_content = f.read()
    #splitting text.txt by non alphanumeric characters
    processed = re.split('[^a-zA-Z]', f_content)

    st_content = st.read()
    #splitting stopwords.txt by new line
    st_list = re.split('\n', st_content)
    #print(st_list) to check it was working

    #what I'm trying to do is: traverse through the text. If stopword appears, 
    #remove it. otherwise keep it. 
    for word in st_list:
        f_content = f_content.replace(word, "")
        print(f_content) 

```

but when I run the code, it first takes forever to output something and when it does it just outputs the entire text file. (I'm new to python so let me know if I'm doing something fundamentally wrong!)