我做了
def is_subsequence(x, y): """Test whether x is a subsequence of y""" x = list(x) for letter in y: if x and x[0] == letter: x.pop(0) return not x
欢迎分享,转载请注明来源:内存溢出
我做了
def is_subsequence(x, y): """Test whether x is a subsequence of y""" x = list(x) for letter in y: if x and x[0] == letter: x.pop(0) return not x
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)