With open, not open
This commit is contained in:
parent
ff090f2744
commit
2b90d9a495
|
@ -9,12 +9,10 @@ import geohash
|
|||
|
||||
|
||||
def get_words(fname):
|
||||
lines = open(fname)
|
||||
with open(fname) as lines :
|
||||
words = []
|
||||
for word in lines:
|
||||
words.append(word.strip())
|
||||
|
||||
lines.close()
|
||||
random.seed(634634)
|
||||
random.shuffle(words)
|
||||
words = words[:2**15]
|
||||
|
|
Loading…
Reference in New Issue