I am trying to search from a list in python. Whenever I input the search term it always say "No tweets contained search", even when I know that the term is in the list. What am I doing wrong?
elif(ch==3):
match = 0
tweetlist.reverse()
if tweetlist == []:
print("There are no tweets to search.\n")
continue
else:
search = input("What would you like to search for? ")
for tweets in tweetlist:
if(search in tweetlist):
match = 1
if match == 1:
print ("Search Results")
print("----------")
print(tweets.get_author(), "-", tweets.get_age())
print(tweets.get_text(), "\n")
elif match == 0:
print("No tweets contained,", search, "\n")