I want to know what is the best approach to find the number of occurrence in text based on list of string. I found some use sum(any()) but it didn't work because if text contains "re" it will count it
list1 = ['red', 'green', 'amazing', 'orange', 'amazing color', 'gray', 'pink']
text="green and red is an amazing color "
The expect count is 4
Thank you