I am trying to achieve this
string_list = ["red","blue","green"]
text = "This is a string about my favourite colours like red blue and green but blue is the best"
some_function(string_list,text)
Output: [1,2,1]
How do I achieve this? Getting a number which adds all occurrences (4 in this case) is no problem, but I´d like it to be seperated by the string_list items.