Last active
October 13, 2016 22:57
-
-
Save kwekuboateng/062ee78d8a464646b878b80c9a9489d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def Subsets(sets): | |
x = [[]] | |
for i in sets: | |
for j in x: | |
x = x + [j + [i]] | |
return x | |
a = [1,2,5,6] | |
print(Subsets(a)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment