<div dir="ltr"><div>I have&nbsp;a list of labels for a data file,</div>
<div>&nbsp;</div>
<div>test = [&#39;depth&#39;, &#39;4&#39;, &#39;6&#39;, &#39;10&#39;, &#39;15&#39;, &#39;20&#39;, &#39;30&#39;, &#39;40&#39;, &#39;angle&#39;]</div>
<div>&nbsp;</div>
<div>I would like to get the&nbsp;string of the first value that is greater than a known value and the previous string.</div>
<div>&nbsp;</div>
<div>If I have 15.8, I would like to get the index of &#39;20&#39; and &#39;15&#39;.&nbsp; I would also like to make sure that my known value falls in the range 4-40.</div>
<div>&nbsp;</div>
<div>I am having trouble with the mixed types.</div>
<div>&nbsp;</div>
<div>for i in range(len(test)):<br>&nbsp;&nbsp;&nbsp; if Field &lt; int(test[i]):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print i</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div></div>