title: how to find the range of numbers
body: <p>I have a list of numbers in the text.txt file.<br>
  2.50<br>
  2.56<br>
  2.81<br>
  2.86<br>
  2.84<br>
  3.21<br>
  3.47<br>
  2.91<br>
  2.96<br>
  3.11<br>
  2.83<br>
  2.89<br>
  2.94<br>
  2.94<br>
  3.34<br>
  3.44<br>
  2.94<br>
  2.96<br>
  3.04<br>
  3.01<br>
  2.85<br>
  3.05<br>
  3.10  </p>
  
  <p>i want to bin each numbers of set of range. like how many in a range.<br>
  2.5-2.7<br>
  2.7-2.9<br>
  2.9-3.1<br>
  3.1-3.3<br>
  3.3-3.5</p>
  
  <p>i have try this.    </p>
  
  <pre><code>from __future__ import division
  from math import *
  from numpy import *
  from string import*
  
  infile = open('text1.txt', 'r')
  text = infile.read().split('\n')
  infile.close()
  text.remove('')
  
  numbers = []
  for i in text:
  count = 0
  if (numbers[i] &gt; 2.49) and (numbers[i] &lt; 2.59):
      count += 1
      print("Number of elements", count)
  </code></pre>
  
  <p>it is not working</p>