I have a string in python,
I need to find all the possible ways any substring of that string (including itself)
could be selected. A substring (for my purposes) does not have to be contiguous, in the original string -- it could have gaps.
Eg: "frogman"
is one of the many substrings of "froghuman'
under this definition.
For example of the would function:
If my string is "abcd"
, the output should be:
[ "a", "b", "c", "d", "ab", "ac", "ad", "bc", "bd", "cd", "abc", "abd", "acd", "bcd", "abcd" ]