I am trying to split on the second,
file = open()
dictionary = {}
for linje in filen:
bites = linje. split()
month = bites[0]
temp = bites[0]
dictionary[month] = temp
print(dictionary)
The file looks like this:
Jan,1,2.7
Jan,2,2.8
Jan,3,0.7
Jan,4,1.8
Jan,5,1.2
...... each day every day of the year.
If I write split(",") the output becomes this in my dictionary:
{Jan : Jan}.
If I don't split it becomes like this:
{Jan,1,2.7 : Jan,1,2.7}
I want it to be like this:
{Jan,1: 2.7}