File size: 256 Bytes
a3b2a61 | 1 2 3 4 5 6 7 8 9 10 11 12 13 |
def loadFileIntoDict(file):
with open(file, "r") as f:
lines = f.readlines()
f.close()
D = {}
for index_genre_pair in lines:
index, genre = index_genre_pair.split(',')
D[int(index)] = genre[:-1]
return D
|