def of_bucket(lst, depth=0) :
	""" return all combinations of items in buckets """
	#dbg print("of_bucket({0}, {1})".format(lst, depth))
	for item in lst[0] :
		if len(lst) > 1 :
			for result in of_bucket(lst[1:], depth+1) :
				yield [item,] + result
		else :
			yield [item,]
 return all combinations of items in buckets 
recipes/Python/579098_pick_all_combinations_items/recipe-579098.py