Power Set
The power set of S is the set of all combinations of elements of S or the set of all subsets of S, denoted P(S). For example, let S={a,b,c}, then P(S)={∅,{a},{b},{c},{a,b},{a,c},{b,c},{a,b,c}}.
OBJECTIVE
Complete the definition for the power_set function. The function should accept a list and return its power set (e.g. P(S) as a list).
LAB ACTIVITY
15.10.1: Power Set (Difficulty: III)
0/7
main.py
Load default template...
def power_set(L):
assert isinstance(L, list)
# complete the implementation below
return []