def makeDict(filename):
with open(filename,"r") as f:
dict_={}
for line in f:
(key,value1,value2)=line.split()
dict_[key]=[(float(value1),float(value2))]
mylist=[]
for value1 in dict_:
if number < value1 < number:
mylist.append(key)
one last question and I should be done here. It appears that my values are still not coming out as floats because I am trying to check if the value is between 2 numbers and i get this error
TypeError: unorderable types: int() < str()
newDict=makeDict("file.txt")
>>> testdict(500,530,newDict)
line 28, in testdict
for k,v in newDict.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'