Just to say I have a str and a list of strs and I want to count how many strs in the list that is contained in a str. Is there an elegant way to do that?
For example,
l = {"foo", "bar", "what"}
str = "foobar"
The output will be 2.
My way to do this for now is iterate the list and see whether str.contains(str_in_list)