参考代码:
class Solution: def canConvert(self, s, t): j = 0 for i in range(len(s)): if s[i] == t[j]: j += 1 if j == len(t): return True return False