Question: solution required in python Task 2 Write a function, subsequences that returns all the subsequences in a list of a string (which the function takes

solution required in python
Task 2 Write a function, "subsequences" that returns all the subsequences in a list of a string (which the function takes as an argument). For example, subsequences of "abc" might return ["abc", "ab", "bc","ac","a", "b","c",""). Note the empty string, which is also a valid subsequence. This problem lends itself to an elegant recursive decomposition. Take the first letter of the word. We can form one set of subsequences that include that letter, and another set of subsequences that exclude that letter, and those two sets completely cover the set of possible subsequences. Sample run: Enter string: abc Subsequences of abc ["abc","ab","bc","c","a","b","c",""]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
