Re: [Tutor] Reading file and storing keys

2012-06-27 Thread moheem ilyas
It was because I was testing with a large file. Thanks for your help/advice. On Wed, Jun 27, 2012 at 8:47 PM, Dave Angel wrote: > On 06/27/2012 08:38 PM, moheem ilyas wrote: > > Thanks. That makes sense, just failed to notice it. Btw, I tried printing > > out wordDict an

Re: [Tutor] Reading file and storing keys

2012-06-27 Thread moheem ilyas
Thanks. That makes sense, just failed to notice it. Btw, I tried printing out wordDict and Python became unresponsive. Any ideas On Wed, Jun 27, 2012 at 8:33 PM, Dave Angel wrote: > On 06/27/2012 08:19 PM, moheem ilyas wrote: > > I am working on a problem from a book, Think Python

[Tutor] Reading file and storing keys

2012-06-27 Thread moheem ilyas
I am working on a problem from a book, Think Python, which I thought would be fairly easy. The problem is: Exercise 11.1. Write a function that reads the words in words.txt and stores them as keys in a dictionary. It doesn’t matter what the values are. Then you can use the in operator as a fast wa