I'm attempting to write a simple search engine (which you might know if you read my previous question) that runs off of tags combined in a list. Currently it's just in a basic ASCII output, with things like print functions and the like.
def main(): active = True done = False results =  OTags = ['Hi', 'hi', ... #Continues onward] OResult = ["Type 'Hello' to access this page!"] BTags = ['Bye', 'see ya', ...] BResult = ["Type 'Goodbye' to access this page!"] while active: searchPrompt = raw_input('Https://') if searchPrompt in Otags: results.append(OResult) if searchPrompt in BTags: results.append(BResult) done = True while done == True: print results done = False
Now what this should do is if the user input is in either or both of those tags, it should print the results, which contain instructions on how to access the page you may be looking for. Now besides a lot of polishing I plan on doing at a later date, this should essentially cover the entire 'search' component. However, it only accepts the OTags or the BTags seperately, if I were to type 'Hi Goodbye', it would print a blank set of brackets. I think this is because of the fact that they're if statements, but the same thing happens if I use elif statements. So I was thinking, is there a sort of ANIF statement, something that would allow both of the inputs to be picked up? Any help is appreciated.