Hi! I'm working on code for a personal project thingie, and I'm stumped by part of it.
I am trying to search a line (provided in a separate .txt file) to see if I can find any consecutive occurrences of elements of a list in said line.
For example: in my list are words like "is" and "young." I would like to my module to search the text file and return words such as "youngish" which contains both of these words in immediate conjunction. I've only been able to produce words containing one or two elements of the list, but never in conjunction.
Advice from wiser python users than I would be much appreciated!