class Solution(object):
def isValid(self, s):
"""
:type s: str
:rtype: bool
"""
while 'abc' in s:
s = s.replace('abc','')
# s为空则为true
return not s
01-22
422
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-02
290
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)