#############ERRROR###################### #Please note: this box here is only #for you to read. It is not part of the #actual source code. # #Traceback (most recent call last): # File "", line 1, in #invalid syntax: , line 19, pos 22 # #Real code beings below ######################################### from picture import * import warmup def read_file (f): for line in f: yield line.split(":") def file_to_dictionary(file): lines = {} temp = '' temp_list = [] for x in read_file(file): for y in x: try: if float(y): value = float(y.strip()) temp_list.append('%02g'%value) except ValueError: print y if y == "US" or y == "INT": temp_list.append(y) lines [temp] = temp_list else: lines [temp] = temp_list temp = y return lines file = open ('airport_data.txt') print file_to_dictionary (file)