How to compare an array value with another explicit value in python
<p>I want to do something like this</p>

<pre><code>while(x&lt;100 for x in someList):
    if someList has a value more than 100
    the loop should end.
</code></pre>

<p>This will also end the loop when value is greater than 100</p>

<pre><code>for x in someList:
    if x &gt; 100:
        break
</code></pre>

<p>You can try this:</p>

<pre><code>i=0
while ((i&lt;len(someList)) and (someList[i] &lt;= 100) ):
  '''Do something'''
  i+=1
</code></pre>

python loops compare