Ask
your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW)
46 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
Raider:
how would i go about figuring this out, its GCF factoring(18x^{5}+9x^{3}-3x\)
zari2drunk:
Read the excerpt from Outcasts United. Tryouts were to be held on the field of the Clarkston Community Center, an old brick and cream-colored clapboard buil
IzzyCookie:
Does anyone have any helpful tips on how to draw human perspective? I look at ref
emmarose:
My thoughts Sometimes i feel cold left in a room locked up Staring at the ceiling
emmarose:
My thoughts Sometimes i feel cold left in a room locked up Staring at the ceiling
idontexistrn1:
Y'all I think I'm dying my throat is so scratchy and it hurts so much and dayquil isn't working.
1 hour ago
4 Replies
1 Medal
10 hours ago
2 Replies
0 Medals
13 hours ago
2 Replies
3 Medals
1 hour ago
8 Replies
2 Medals
14 hours ago
24 Replies
0 Medals
15 hours ago
5 Replies
2 Medals