Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 12 Online
OpenStudy (anonymous):

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?

OpenStudy (anonymous):

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

OpenStudy (anonymous):

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.

OpenStudy (anonymous):

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!
Latest Questions
HeyItsAlicia: Why was questioncove not working??
2 hours ago 2 Replies 1 Medal
Countless7Echos: Ah trying out the whole T.V girl drawing :p (I love drawing eyes)
12 hours ago 14 Replies 6 Medals
kaelynw: starting to draw a hand
2 days ago 17 Replies 2 Medals
Twaylor: Rate it :D (Took 2 days)
6 days ago 7 Replies 0 Medals
XShawtyX: Art, Short Writing Assignment: Imagining Landscapes
2 days ago 9 Replies 1 Medal
XShawtyX: Chemistry, Help ud83dude4fud83cudffe
1 week ago 13 Replies 1 Medal
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!