class Solution(object):
def numOfStrings(self, A, B):
"""
:type patterns: List[str]
:type word: str
:rtype: int
"""
ans = 0
for a in A:
if a in B:
ans += 1
return ans
作者:Jack
链接:https://leetcode.cn/problems/number-of-strings-that-appear-as-substrings-in-word/solutions/1964721/by-jack-oi-s14f/
来源:力扣(LeetCode)
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。