I would like to transform that code in to iterative code, because i had recursion error even with passby recursion limit
ps = PorterStemmer()
train_text = train["comment_text"]
train_corpus = []
for i in range(0, len(train_text)):
data = re.sub("[^a-zA-Z]", ' ', train_text[i]).lower().split()
data = [ps.stem(word) for word in data if not word in set(stopwords.words("english"))]
data = ' '.join(data)
train_corpus.append(data)