subsequence python

Solutions on MaxInterview for subsequence python by the best coders in the world

showing results for - "subsequence python"
Christa
04 Jan 2020
1def printSubSequences(STR, subSTR=""):
2    if len(STR) == 0:
3        print(subSTR, end=" ")
4        return
5    printSubSequences(STR[:-1], subSTR + STR[-1])
6    printSubSequences(STR[:-1], subSTR)
7    return
8
9# Input : abc
10# Output : a, b, c, ab, bc, ac, abc