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