summaryrefslogtreecommitdiff
path: root/progs/a258.py
blob: 991e8f61345f7882e43aea344380d73517ddeb6a (plain)
1
2
3
4
5
6
7
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