Hi All,
See the code using set difference operation
--------------------------------
stopwords="is and it when which where to in have has "
testdata="it is bad and worst"
stoplist=stopwords.split()
testlist=testdata.split()
newtestlist=list(set(testlist)-set(stoplist))
print(newtestlist)
----------------------------------------
See the code using set difference operation
--------------------------------
stopwords="is and it when which where to in have has "
testdata="it is bad and worst"
stoplist=stopwords.split()
testlist=testdata.split()
newtestlist=list(set(testlist)-set(stoplist))
print(newtestlist)
----------------------------------------