Ask
your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW)
50 Online
I'm working on problem set #6, the one with the scrabble-like word game. I'm trying to figure out how to define a function that will provide all the subsets (or sub-multisets) within a hand. I suspect I should be able to write a recursive function for it, but I'm stumped. Where to turn?
Still Need Help?
Join the QuestionCove community and study together with friends!
i found the itertools module in the standard library useful http://docs.python.org/library/itertools.html#itertools.permutations http://docs.python.org/library/itertools.html#itertools.combinations
Yes, I was searching for advice on permutations and found this also. It will do what I need, but it seems like it would be more beneficial to learn to you write a function myself.
nested loops? one for each character position?
Can't find your answer?
Make a FREE account and ask your own questions, OR help others and earn volunteer hours!
Join our real-time social learning platform and learn together with your friends!
Join our real-time social learning platform and learn together with your friends!
Latest Questions
VAN1LLA:
I'm having my art midterm. I would like to ask for recommendations on positive me
uknownprttyfacekayla:
Has anyone watched the Harvest Empire? is based on American immigration, basicall
Bounty:
hand prints words unspoken there's no love you don't understand where those hands explored the same person you all adored as he took his "fair share" you gu
cullenn:
What is it like being Catholic? Like.. how does it differ from Christians and oth
Ultrilliam:
Welcome to the 10th anniversary update! (Part 1) As we're approaching the 10th anniversary it only makes sense for a soft refresh with a lot of revamped and
unknownnnnnn:
Itu2019s strange how someone Iu2019ve never stood next to can feel this close to me.
1 hour ago
0 Replies
0 Medals
2 hours ago
0 Replies
0 Medals
13 hours ago
6 Replies
1 Medal
54 minutes ago
7 Replies
1 Medal
11 minutes ago
29 Replies
15 Medals
1 day ago
4 Replies
0 Medals