diff --git a/thesethreewords.py b/thesethreewords.py index a398d6c..357423d 100644 --- a/thesethreewords.py +++ b/thesethreewords.py @@ -9,12 +9,10 @@ import geohash def get_words(fname): - lines = open(fname) - words = [] - for word in lines: - words.append(word.strip()) - - lines.close() + with open(fname) as lines : + words = [] + for word in lines: + words.append(word.strip()) random.seed(634634) random.shuffle(words) words = words[:2**15]