2 ms·
Don't know when set comprehensions and resource handlers were introduced so that might not run everywhere def read_words(words_file): with open(wor
by agumonkey 13y ago
Don't know when set comprehensions and resource handlers were introduced so that might not run everywhere
def read_words(words_file):
with open(words_file, 'r') as f:
return {word for line in f for word in line.split()}