View Single Post
Join Date: May 2008
Posts: 837
Reputation: Paul Thompson has a spectacular aura about Paul Thompson has a spectacular aura about 
Solved Threads: 130
Sponsor
Paul Thompson's Avatar
Paul Thompson Paul Thompson is offline Offline
previously paulthom12345

Re: Improve scrambled text game

 
0
  #2
Sep 14th, 2008
It would be cool if you could have a text file full of all of the words so the user could add their own.

Your text file could look like this:
Python:yothnp
spam:apms

This was the user could add their own and you could just import it to a dictionary at the start like:
  1. f = open("Words.txt")
  2. for thing in f.split(":"):
  3. dictionary[thing[0]]=thing[1]
Make it idiot proof and someone will make a better idiot.
Check out my Site | and join us on IRC | Python Specific IRC
Reply With Quote