Counting Neutral Tweets (Optional Q16d)

Need help. Tried to count ‘neutral tweet’ in the following way, not sure what is wrong with it.

store the final answer in this variable

number_of_neutral_tweets = 0

perform the calculation here

for tweet in tweets:
for h_word in happy_words:
for s_word in sad_words:
if h_word or s_word not in tweet:
number_of_neutral_tweets = number_of_neutral_tweets + 1
print(‘Number of neutral tweets’, number_of_neutral_tweets)

If tweet is not happy or sad, then it has to be neutral.

total = happy + sad + neutral.

You know the number of happy and sad tweets, along with the total number of the tweets.

Just move the equation around.

number_of_both_tweets = 0

is_both_tweets= False

c=happy_words+sad_words

for w in c:
for a in tweets:
if w in a:
is_both_tweets = True
number_of_both_tweets = number_of_both_tweets + 1

number_of_neutral_tweets=len(tweets)-number_of_both_tweets

This is the way i calculated the neutral tweets. i had tries as you using not in and using the two lists , but gave to me a lot of trouble .