with open("words_10percent.txt") as f:
file_data = f.read()
word_frequency = {}
for line in file_data.split("\n"):
word, frequency = line.split(",")
word_frequency[word] = float(frequency)
In line 5 I get a value error when trying to split the line.