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