Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 17 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
EdwinJsHispanic: I'm liking the wrong person more and more what do I do
10 minutes ago 0 Replies 0 Medals
Skyler14: wishing everyone a happy early thanksgiving
3 hours ago 1 Reply 0 Medals
ImAugie: Luisa if u see this text me
22 minutes ago 4 Replies 1 Medal
Peer0Pressures0bad: what do I do if I really like someone, but they are acting really distant?
10 hours ago 17 Replies 1 Medal
EdwinJsHispanic: what to do when u like someone ur not supposed to like
7 hours ago 6 Replies 0 Medals
KRYPTICVAMPP: How do I subscribe to Qc chat?
23 hours ago 7 Replies 3 Medals
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!