Pad sequences has a shape of (2225, 2442) instead of (2225, 2438)

my code runs perfectly. my expected outputs has been accurate except this. I cant spot the bug and I don’t think there is a mistake. I am attaching my code so the mods can look at it

[code removed - moderator]

Please fix your implementation of remove_stopwords.

A list remove method removes only the 1st occurrence of the parameter. Here’s an example:

>>> sentence = "a kid laughed at a joke"
>>> words_in_a_sentence = sentence.split()
>>> words_in_a_sentence
['a', 'kid', 'laughed', 'at', 'a', 'joke']
>>> words_in_a_sentence.remove('a')
>>> words_in_a_sentence
['kid', 'laughed', 'at', 'a', 'joke']
1 Like

I didn’t realize this. Thank you!