Skip to content

Instantly share code, notes, and snippets.

@kharioki
Created October 13, 2016 20:28
Show Gist options
  • Save kharioki/793d50f53994ec0d48884b3f1660fa34 to your computer and use it in GitHub Desktop.
Save kharioki/793d50f53994ec0d48884b3f1660fa34 to your computer and use it in GitHub Desktop.
def subsets(my_set):
result = [[]]
for x in my_set:
result = result + [y + [x] for y in result]
return result
a = [1,2,3]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment