Mar-19-2019, 02:24 PM
(Mar-18-2019, 08:13 PM)ichabod801 Wrote: Loop over the words in example_list, and test each one with message.startswith(word).
The problem that I'm still having with this is if I have two elements such as 'foo' and 'foo bar' that it will detect both of them if message is 'foo bar' because message still starts with 'foo'. I would just want it to detect and print 'foo bar'