Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def bruteForceLeft(selected,index):
- if index==len(left):
- #print(selected)
- yield selected
- else:
- selected[0].append(left[index])
- bruteForceLeft(selected,index+1)
- selected[0].pop()
- bruteForceLeft(selected,index+1)
- for option in bruteForceLeft(([],[]),0):
- print(option)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement