We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae66896 commit d0980ffCopy full SHA for d0980ff
subsets
@@ -0,0 +1,8 @@
1
+from itertools import chain, combinations
2
+def give_subsets(iterable):
3
+
4
+ l = list(iterable)
5
+ return chain.from_iterable(combinations(l,n) for n in range(len(l)+1))
6
7
+A = {1,2,3,4}
8
+list(give_subsets(A))
0 commit comments