diff options
Diffstat (limited to 'progs/a258.py')
-rw-r--r-- | progs/a258.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/progs/a258.py b/progs/a258.py new file mode 100644 index 0000000..991e8f6 --- /dev/null +++ b/progs/a258.py @@ -0,0 +1,8 @@ +from itertools import combinations
+def sub_lists(my_list):
+ subs = []
+ for i in range(0, len(my_list)+1):
+ temp = [list(x) for x in combinations(my_list, i)]
+ if len(temp)>0:
+ subs.extend(temp)
+ return subs
\ No newline at end of file |