Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class PythonLabActivity:
- def sub_sets(self, sset):
- return self.subsets_recur([], sorted(sset))
- def subsets_recur(self, current, sset):
- if sset:
- return self.subsets_recur(current, sset[1:]) + self.subsets_recur(current + [sset[0]], sset[1:])
- return [current]
- for name in PythonLabActivity.__dict__:
- print(name)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement