Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 10 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!
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!