title: How to find out the index of value in list?
body: <p>I have a list with floats and I am looking for an index of the value in the interval (5-eps;5+eps). How to do that please? This gives me an error about types: TypeError: '&lt;' not supported between instances of 'list' and 'float'</p>
  
  <pre><code>import numpy as np
  
  LIST = [4.1, 5.02, 4.99999, 5.00001]
  eps = 0.001
  index, = np.where((LIST &lt; 5+eps) &amp; (LIST &gt; 5-eps))
  print('Index', index)
  </code></pre>