5 lines
146 B
Python
5 lines
146 B
Python
file = open("train-300k.txt", "rt", encoding="utf-8")
|
|
data = file.read()
|
|
words = data.split()
|
|
|
|
print('Number of words in text file :', len(words)) |