【发布时间】:2022-01-15 17:02:06
【问题描述】:
def countGoodSubsequences(word):
combs=[]
for i in range(1, len(word)+1):
combs.append(list(itertools.combinations(word,i)))
l2=[]
for c in combs:
for t in c:
l2.append(''.join(t))
return l2
wordi= "abca"
l3=countGoodSubsequences(wordi)
print(l3)
【问题讨论】:
-
你能添加预期的输出吗?
-
问题是什么?