题目链接
2788. 按分隔符拆分字符串 - 力扣(LeetCode)
解题思路
class Solution:
def splitWordsBySeparator(self, words: List[str], separator: str) -> List[str]:
result = []
for i in words:
for j in i.split(separator):
if j:
result.append(j)
return result