1 class Solution:2 def findOcurrences(self, text: str, first: str, second: str) -> 'List[str]':3 ary = text.split(' ')4 n = len(ary)5 result = list()6 for i in range(n):7 if ary[i] == first and i+1
本文共 298 字,大约阅读时间需要 1 分钟。
1 class Solution:2 def findOcurrences(self, text: str, first: str, second: str) -> 'List[str]':3 ary = text.split(' ')4 n = len(ary)5 result = list()6 for i in range(n):7 if ary[i] == first and i+1
转载于:https://www.cnblogs.com/asenyang/p/10994614.html