Skip to content

Commit

Permalink
Update presort.py
Browse files Browse the repository at this point in the history
directory corrections
  • Loading branch information
raspitv committed Feb 3, 2015
1 parent 900c82b commit 317f562
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions presort.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
# This program works with the scrabble/words with friends word list wordlist.txt
# The file is modified so each line contains an alphabetically sorted version of
# each word, then the word itself. e.g. abeprrrsy, raspberry
# and stored as /home/pi/sortedwordlist.txt
# and stored as sortedwordlist.txt

# The whole file (line order) is then alphabetically sorted and stored as
# (/home/pi/sortedwordlist2.txt)
# (sortedwordlist2.txt)
# It's a bit of a hack, but makes for much more efficient anagram searching.

import time
start_time = time.time()
print "Starting now..."

# Open the word list file and read it into a Python list
results = list(open("/home/pi/wordlist.txt", "r"))
results = list(open("wordlist.txt", "r"))
clean_lines = [x.strip() for x in results] # takes out the /n line ends

results = clean_lines
Expand Down

0 comments on commit 317f562

Please sign in to comment.