I am trying to transform a file to dictionary but having error.
def txt_to_dict():
dict = {}
with open("GEO_human.gaf") as f:
for line in f:
(key, val) = line.split(":")
dict[(key)] = val
print dict
txt_to_dict()
This is my error
(key, val) = line.split(":") ValueError: need more than 1 value to unpack
GEO_human.gafcontent