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

In P.S 6, I am kinda confused about what I am supposed to do for the pick_best_word_faster part. From what I've gathered, I am supposed to make a dictionary with the key being the letters of a word in different orders and the values being the words. Is that correct?

OpenStudy (anonymous):

yes that is correct

OpenStudy (anonymous):

use the itertools module to help you. there's a function called combination that picks combinations of letters (and stores it as a list) for you. from itertools import combination

OpenStudy (anonymous):

you are supposed to make a dictionary where the key is a string with the letters of the word in sorted order and the value is the word for the string 'make', the dictionary item would be .. {'aekm' : 'make'} then use that dictionary with letter combinations from the hand to find words.

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
Breathless: Spooky witch but cute
4 hours ago 3 Replies 0 Medals
Arriyanalol: help
4 hours ago 10 Replies 2 Medals
Arriyanalol: @tinydinoUwU stop trying to find a argument u blad lil boy
1 day ago 5 Replies 3 Medals
Jaded012023: Please tell me what you all think of this song
7 hours ago 6 Replies 1 Medal
Arriyanalol: bro how
6 hours ago 2 Replies 3 Medals
Arriyanalol: cant wait for the new bluey movie in 2027
1 day ago 12 Replies 2 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!