Using the definition of a sub list from Exercise 133, write a function that returns a list containing every possible sub list of a list. For example, the sub lists of [1, 2, 3] are [], [1], [2], [3], [1, 2], [2, 3] and [1, 2, 3]. Note that your function will always return a list containing at least the empty list because the empty list is a sub list of every list. Include a main program that demonstrate your function by displaying all of the sub lists of several different lists.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here