I am trying to remove the element that have minimum value in the dictionary to try to arrange the rest to the ascending order;
dict={}
for line in file:
line = line.split()
dict.update({line[0]:line[1]})
while dict.items():
min = float(100)
for x in dict:
print(dict[x])
g=float(dict[x])
if (g<min):
min=float(dict[x])
print(min)
for name, avg in dict.items():
if float(avg) == min:
print(name)
fileout.write(name+ '\t' + str(avg) + '\n')
del dict[name]
print(dict)