title: creating a dictionary from a text file 2 values
body: <pre><code>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 &lt; value1 &lt; number:
          mylist.append(key)
  </code></pre>
  
  <p>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</p>
  
  <blockquote>
    <p>TypeError: unorderable types: int() &lt; str()</p>
  </blockquote>
  
  <pre><code>    newDict=makeDict("file.txt")
       &gt;&gt;&gt; testdict(500,530,newDict)
  
      line 28, in testdict
      for k,v in newDict.iteritems():
   AttributeError: 'dict' object has no attribute 'iteritems'
  </code></pre>