Python: Removes the given string from the list if the string includes some keyword v.2


I am trying to make a code to exclude certain keywords in the string from the list of strings. This morning with help from stackoverflow, I could add the code that can exclude certain strings which include the certain keywords. Python: Remove the certain string from list if string includes certain keyword

However, when I change the data set, it does not work.

# -*- coding: utf-8 -*-

import nltk, json, os, csv, matplotlib, pylab, re
from matplotlib import *
from nltk import *
from pylab import *
from re import *

'Start with empty list'

for line in open('apple.json'):


for tweet in tweets:
    for key, value in tweet.items():
        if key=='text':


tweetsFBK=[str for str in original_list if not any(word in str for word in keywordFilter)]
print (tweetsFBK)

From this morning code to above code, I only changed tweetsF part which returns the list of strings from the data source. However, I think it isn't really a matter because it is a list of strings like this morning question.

Do you have any idea why excluding part does not return any value (i.e returns 0). ?


original_list=['RT @haussera: Access to Apple Pay customer data, no, but another way? everybody wins - MarketWatch', "Landed in the US, tired w horrible migrane. The only thing helping- Connie's new song on repeat. #SoGood #Nashville", 'I wish jacob would be my cinnamon apple', "I've collected 9,112 gold coins! #iphone, #iphonegames, #gameinsight", 'HAHAHA THEY USED THE SAME ARTICLE AS INDEPENDENT', '@hot1079atl Let me know what you think of the new single "Mirage "\n', 'RT @SWNProductions: Hey All so we have a new iTunes listing due to our old one getting messed up please resubscribe via the following https…', 'Shawty go them apple bottoms jeans and the boots with the furrrr with furrrr the whole club is looking at her