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