I want to use a list of search terms to go through a text file to find certain strings. There are two lists with different search terms and the user has to choose which list to choose.
I tried doing it with an if statement like this:
searchterm = raw_input("Give terms: ")
if searchterm == 'f' or 'F':
term_list = ['f', 'F']
else:
term_list = ['HN', 'H', 'G']
However if I print term_list it always comes back as the first list. How would I do this and why doesn't this work? Is there a better way to do this without it becoming really complex?
EDIT: found the answer in a duplicate. Thanks for the help guys, really appreciate it!