Question: Consider a word (string) made from a sequence of the characters a-z and A-Z. Use Python to define a function with * Input: A word
Consider a word (string) made from a sequence of the characters a-z and A-Z. Use Python to define a function with
* Input: A word as defined above.
* Output: A list of all possible subsequences of the given word seperated by commas.
By subsequence, we mean a string of letters found in word in the same order that they appear in word.
For example:
The input string "abc" would produce the output list ['', 'c', 'b', 'a', 'ac', 'bc', 'ab', 'abc']
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
