I have a list of words and I want to find how many times they occur in a .txt file. The word list is something like as follows:
wordlist = ['cup', 'bike', 'run']
I want to be able to not only pick up these words, but also things like CUP, biker, running, Cups, etc. So I think I need a regular expression. Here is what I was thinking but it doesn't work:
len(re.findall(wordlist, filename, re.I))
Thanks in advance!