(s,temp,index)
| 2 | # Program to find all possible subsequences of a given string/sequence |
| 3 | |
| 4 | def sequence(s,temp,index): |
| 5 | if (len(s)==index): |
| 6 | print(temp,end=" ") |
| 7 | return |
| 8 | |
| 9 | # take |
| 10 | sequence(s, temp+s[index], index+1) |
| 11 | |
| 12 | # not take |
| 13 | sequence(s, temp, index+1) |
| 14 | |
| 15 | |
| 16 | S=input("Enter a string : ") |